@@ -71,7 +71,7 @@ literals = mkPattern' match
7171 ]
7272 match (Var ident) = return $ show ident
7373 match (Do els) = concat <$> sequence
74− [ return "do "
74+ [ return "do\n"
7575 , withIndent $ prettyPrintMany prettyPrintDoNotationElement els
7676 , currentIndent
7777 ]
@@ -99,7 +99,10 @@ prettyPrintCaseAlternative (CaseAlternative binders result) =
9999 , prettyPrintResult result
100100 ]
101101 where
102− prettyPrintResult (Left gs) = concat <$> mapM prettyPrintGuardedValue gs
102+ prettyPrintResult (Left gs) = concat <$> sequence
103+ [ return "\n"
104+ , withIndent $ prettyPrintMany prettyPrintGuardedValue gs
105+ ]
103106 prettyPrintResult (Right v) = (" -> " ++) <$> prettyPrintValue' v
104107
105108 prettyPrintGuardedValue (grd, val) =
@@ -108,7 +111,6 @@ prettyPrintCaseAlternative (CaseAlternative binders result) =
108111 , prettyPrintValue' grd
109112 , return " -> "
110113 , prettyPrintValue' val
111− , return "\n"
112114 ]
113115
114116prettyPrintDoNotationElement :: DoNotationElement -> StateT PrinterState Maybe String