Add small fix.

This commit is contained in:
Danila Fedorin 2019-02-05 23:39:31 -08:00
parent 1b4656a099
commit 2f5fc49117
1 changed files with 2 additions and 2 deletions

View File

@ -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 (Call n xs) = [ "call " ++ n ++ "(" ++ intercalate ", " (map prettyPrintExpr xs) ++ ");" ]
prettyPrint :: Prog -> String
prettyPrint prog = intercalate "\n" $ (prog >>= prettyPrintCmd) ++ [ "" ]
pretty :: Prog -> String
pretty prog = intercalate "\n" $ (prog >>= prettyPrintCmd) ++ [ "" ]
macros :: Prog -> [Macro]
macros xs = xs >>= macrosC