diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-03-04 23:18:42 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-03-04 23:18:55 +0100 |
commit | 138d1a5488638431595028bfec645008a5d5e0bb (patch) | |
tree | 89954373816db132da4994a2195b9b64897d6c13 | |
parent | 2cce83edce315a1d04811f50e28d60ec20d70bbc (diff) |
Fix ppParen in pretty of EWith
-rw-r--r-- | src/AST/Pretty.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AST/Pretty.hs b/src/AST/Pretty.hs index 5e01af8..7634cd0 100644 --- a/src/AST/Pretty.hs +++ b/src/AST/Pretty.hs @@ -236,13 +236,13 @@ ppExpr' d val expr = case expr of e1' <- ppExpr' 11 val e1 name <- genNameIfUsedIn' "ac" (STAccum (typeOf e1)) IZ e2 e2' <- ppExpr' 0 (Const name `SCons` val) e2 - return $ group $ flatAlt - (ppParen (d > 0) $ - hang 2 $ + return $ ppParen (d > 0) $ + group $ flatAlt + (hang 2 $ annotate AWith (ppString "with") <> ppX expr <+> e1' <+> ppString "$" <+> ppString "\\" <> ppString name <+> ppString "->" <> hardline <> e2') - (ppApp (annotate AWith (ppString "with") <> ppX expr) [e1', ppLam [ppString name] e2']) + (ppApp (annotate AWith (ppString "with") <> ppX expr) [e1', ppLam [ppString name] e2']) EAccum _ i e1 e2 e3 -> do e1' <- ppExpr' 11 val e1 |