interpret
[minfp.git] / ast.icl
diff --git a/ast.icl b/ast.icl
index 8ee15a2..a240b55 100644 (file)
--- a/ast.icl
+++ b/ast.icl
@@ -1,7 +1,9 @@
 implementation module ast
 
 import StdEnv
+import Data.Either
 import Text
+import int
 
 instance toString Function where
        toString (Function i a e) = concat [toString i, " ", join " " (map toString a), " = ", toString e]
@@ -11,11 +13,10 @@ instance toString Expression where
        toString (Var s) = toString s
        toString (App l r) = concat ["(", toString l, " ", toString r, ")"]
        toString (Lambda a e) = concat ["(\\", toString a, ".", toString e, ")"]
-       toString (Builtin v as) = concat ["'", toString v, "'", join " " (map toString as)]
        toString (Let i b r) = concat [toString i, " = ", toString b, "\n", toString r]
        toString _ = abort "toString Expression not implemented"
 
 instance toString Value where
        toString (Int i) = toString i
        toString (Bool b) = toString b
-       toString (Func a as _) = concat ["Function arity ", toString a, " curried ", join "," (map toString as)]
+       toString (Func a) = concat ["Function "]