fixed printing:)
[cc1516.git] / spl.icl
diff --git a/spl.icl b/spl.icl
index 383b84e..3e970a4 100644 (file)
--- a/spl.icl
+++ b/spl.icl
@@ -40,9 +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])] []]]]
+                                       ,FunStmt "1printstr" [VarExpr zero (VarDef "x" [FieldTl])] []]]
+                       ,
+                       FunDecl zero "1printbool" ["x"] Nothing [] [
+                               IfStmt (VarExpr zero (VarDef "x" []))
+                                       [FunStmt "1printstr" [makeStrExpr zero $ fromString "True"] []]
+                                       [FunStmt "1printstr" [makeStrExpr zero $ fromString "False"] []]]
+                       ] 
 
 Start :: *World -> *World
 Start w