IfStmt (FunExpr zero "isEmpty" [VarExpr zero (VarDef "x" [])] [])
[]
[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" [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)
Start :: *World -> *World
Start w