Add small fix.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user