diff --git a/HW3.fedorind.hs b/HW3.fedorind.hs index d0504ba..690a808 100644 --- a/HW3.fedorind.hs +++ b/HW3.fedorind.hs @@ -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