fixed printing:)
[cc1516.git] / spl.icl
diff --git a/spl.icl b/spl.icl
index 9976cc1..3e970a4 100644 (file)
--- a/spl.icl
+++ b/spl.icl
@@ -40,19 +40,15 @@ preamble (AST fd) = AST (pre ++ fd)
                pre = [
                        FunDecl zero "1printstr" ["x"] Nothing [] [
                                IfStmt (FunExpr zero "isEmpty" [VarExpr zero (VarDef "x" [])] [])
-                                       []
+                                       [ReturnStmt Nothing]
                                        [FunStmt "1printchar" [VarExpr zero (VarDef "x" [FieldHd])] []
                                        ,FunStmt "1printstr" [VarExpr zero (VarDef "x" [FieldTl])] []]]
                        ,
                        FunDecl zero "1printbool" ["x"] Nothing [] [
                                IfStmt (VarExpr zero (VarDef "x" []))
-                                       [FunStmt "1printstr" [strOp2 $ fromString "True"] []]
-                                       [FunStmt "1printstr" [strOp2 $ fromString "False"] []]
-                       ]] 
-
-               strOp2 :: [Char] -> Expr
-               strOp2 [] = EmptyListExpr zero
-               strOp2 [x:xs] = Op2Expr zero (CharExpr zero x) BiCons (strOp2 xs)
+                                       [FunStmt "1printstr" [makeStrExpr zero $ fromString "True"] []]
+                                       [FunStmt "1printstr" [makeStrExpr zero $ fromString "False"] []]]
+                       ] 
 
 Start :: *World -> *World
 Start w