Add small fix.
This commit is contained in:
parent
1b4656a099
commit
2f5fc49117
@ -70,8 +70,8 @@ prettyPrintCmd (Move l r) = [ "move(" ++ prettyPrintExpr l ++ ", " ++ prettyPrin
|
|||||||
prettyPrintCmd (Define m vs cmds) = ("define " ++ m ++ "(" ++ intercalate ", " vs ++ ") {") : map (" " ++) (cmds >>= prettyPrintCmd) ++ [ "}" ]
|
prettyPrintCmd (Define m vs cmds) = ("define " ++ m ++ "(" ++ intercalate ", " vs ++ ") {") : map (" " ++) (cmds >>= prettyPrintCmd) ++ [ "}" ]
|
||||||
prettyPrintCmd (Call n xs) = [ "call " ++ n ++ "(" ++ intercalate ", " (map prettyPrintExpr xs) ++ ");" ]
|
prettyPrintCmd (Call n xs) = [ "call " ++ n ++ "(" ++ intercalate ", " (map prettyPrintExpr xs) ++ ");" ]
|
||||||
|
|
||||||
prettyPrint :: Prog -> String
|
pretty :: Prog -> String
|
||||||
prettyPrint prog = intercalate "\n" $ (prog >>= prettyPrintCmd) ++ [ "" ]
|
pretty prog = intercalate "\n" $ (prog >>= prettyPrintCmd) ++ [ "" ]
|
||||||
|
|
||||||
macros :: Prog -> [Macro]
|
macros :: Prog -> [Macro]
|
||||||
macros xs = xs >>= macrosC
|
macros xs = xs >>= macrosC
|
||||||
|
Loading…
Reference in New Issue
Block a user