diff --git a/examples/repl.modal b/examples/repl.modal deleted file mode 100644 index 15cbd7f..0000000 --- a/examples/repl.modal +++ /dev/null @@ -1,8 +0,0 @@ -?(?-) (This is a fully functional Modal REPL.) - -<> quit EOF -<> wait?~ (?~ wait!) -<> (?: print) ?: -<> (EOF wait!) (Bye.\n print) - -(Say something, or type "quit":\n) print wait! \ No newline at end of file diff --git a/makefile b/makefile index ccee82f..f36c470 100644 --- a/makefile +++ b/makefile @@ -8,7 +8,7 @@ all: dest dest: @ mkdir -p bin run: all bin/modal - @ bin/modal -q examples/hello.modal + @ bin/modal src/repl.modal debug: all bin/modal-debug @ bin/modal-debug examples/rules.modal test: all bin/modal-debug bin/modal diff --git a/src/repl.modal b/src/repl.modal new file mode 100644 index 0000000..d3875a8 --- /dev/null +++ b/src/repl.modal @@ -0,0 +1,17 @@ +?(?: ?:) ( +\n +\t Hello. Welcome to Modal\n +\t Start rewriting, or type "quit"\n +\n +\t <> Defines a rule\n +\t >< Undefines a rule\n +\t ?x Assigns a register\n +\n +\t Have fun!\n +\n +) + +<> (quit listen!) (?(?: ?:) (\n\tSee you soon.\n\n)) +<> listen?~ (?~ listen!) + +listen! \ No newline at end of file