From b54c926d7f8fd59ad45b1be8c74fc3e60cec1ad7 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 15 Dec 2016 14:43:04 +0100 Subject: Change :import to import --- iclean.icl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iclean.icl b/iclean.icl index d7d73d8..c29dda3 100644 --- a/iclean.icl +++ b/iclean.icl @@ -50,7 +50,6 @@ help =: "\t:mem\t\t\tDisplay current memory\n" +++ "\t:help\t\t\tDisplay this message\n\n" +++ "\t:set K V\t\tSet iClean's setting K to value V\n\n" +++ - "\t:import MODULE\t\tAdd an import to the memory\n" +++ "\t:def F X1 .. Xn = RHS\tAdd a rewrite rule to the memory\n" +++ "\t:undef F\t\tRemove all rewrite rules starting with 'F ' from the memory\n" @@ -88,7 +87,6 @@ where # w = addHistory s w | s == ":quit" || s == ":q" = w | s == ":mem" = loop stat True (print (join "\n" stat.memory) w) - | matches ":import " s = loop {stat & memory = stat.memory ++ [skip 1 s]} True w | matches ":def " s = loop {stat & memory = stat.memory ++ [skip 5 s]} True w | matches ":undef " s = loop {stat & memory = filter (undef (skip 7 s)) stat.memory} True w | matches ":set " s @@ -97,6 +95,7 @@ where # (ok, msg, stat) = set setting value stat = loop stat ok (if (isNothing msg) id (print (fromJust msg +++ "\n")) w) | s == ":help" = loop stat True (print help w) + | matches "import " s = loop {stat & memory = stat.memory ++ [s]} True w | matches ":" s = loop stat False (print ("Unknown command\n") w) # w = writemodule stat s w # (r,w) = compile temp_path temp_module w -- cgit v1.2.3