]> Repositorios git - scryer-prolog.git/commitdiff
add error messages on failed batch entry
authorMark Thom <[email protected]>
Thu, 8 Mar 2018 00:19:28 +0000 (17:19 -0700)
committerMark Thom <[email protected]>
Thu, 8 Mar 2018 00:19:28 +0000 (17:19 -0700)
README.md
src/main.rs

index e439be462bdac4e233a2ff45c957e82d3bb9ac93..95534515fd0c8e2d1e367d8fe6beb0671643463f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Extend rusty-wam to include the following, among other features:
 * Built-in predicates for list processing and top-level declarative
   control (`setup_call_control/3`, `call_with_inference_limit/3`,
   etc.) (_done_).
-* A rudimentary module system (_in progress_).
+* A rudimentary module system (_done_).
 * Attributed variables using the SICStus Prolog interface and
   semantics. Adding coroutines like `dif/2`, `freeze/2`, etc.
   is straightforward with attributed variables.
@@ -88,9 +88,9 @@ $> cd rusty-wam
 $> cargo build
 ```
 
-cargo will download and install the libraries rusty-wam uses automatically.
-rusty-wam can be run with the command `cargo run`, and likewise tests can be
-run with `cargo test`.
+cargo will download and install the libraries rusty-wam uses
+automatically.  rusty-wam can be run with the command `cargo run`, and
+likewise tests can be run with `cargo test`.
 
 Note on compatibility: rusty-wam should work on Linux, Mac OS X, and
 FreeBSD. Windows support hinges on the Termion library working in
@@ -239,10 +239,10 @@ New operators can be defined using the `op` declaration.
 
 ### Modules
 
-rusty-wam has seemingly correct but presently untested support for a
-simple predicate-based module system. It provides a way to separate
-units of code into distinct namespaces, for both predicates and
-operators. See the files `src/prolog/lib/*.pl` for examples.
+rusty-wam supports for a simple predicate-based module system. It
+provides a way to separate units of code into distinct namespaces, for
+both predicates and operators. See the files `src/prolog/lib/*.pl` for
+examples.
 
 At the time of this writing, several control and list processing
 operators and predicates are hidden in their own modules that have not
@@ -272,4 +272,4 @@ prolog> :- use_module(library(lists), [member/2]).
 ```
 
 A qualified `use_module` can be used to remove imports from the
-toplevel by calling it with an empty import list.
+toplevel by calling it with an empty import list.
\ No newline at end of file
index 695e8c401d2bb591b8d516d117b20d0f967519ab..ad9e8df70facb891ac4b8c9700fd8ca8911dfd2a 100644 (file)
@@ -45,9 +45,11 @@ fn prolog_repl() {
 
         match read() {
             Input::Line(line) => parse_and_compile_line(&mut wam, line.as_str()),
-            Input::Batch(batch) => {
-                compile_listing(&mut wam, batch.as_str());
-            },
+            Input::Batch(batch) =>
+                match compile_listing(&mut wam, batch.as_str()) {
+                    EvalSession::Error(e) => println!("{}", e),
+                    _ => {}
+                },                
             Input::Quit => break,
             Input::Clear => {
                 wam.clear();