Skip to content

Commit 85f89f7

Browse files
committed
PrettyPrint: 'case' to always line-break
1 parent 933573e commit 85f89f7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Language/ECMAScript3/PrettyPrint.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ instance Pretty (CaseClause a) where
167167
CaseDefault _ ss ->
168168
text "default" <> suffix ss
169169
where
170-
suffix ss = colon <> nest 2 (softbreak <> prettyPrint ss)
170+
suffix :: [Statement a] -> Doc
171+
suffix [] = colon
172+
suffix ss = colon <> nest 2 (linebreak <> prettyPrint ss)
171173

172174
instance Pretty InfixOp where
173175
prettyPrint op = text $ case op of

0 commit comments

Comments
 (0)