From 138d1a5488638431595028bfec645008a5d5e0bb Mon Sep 17 00:00:00 2001
From: Tom Smeding <tom@tomsmeding.com>
Date: Tue, 4 Mar 2025 23:18:42 +0100
Subject: Fix ppParen in pretty of EWith

---
 src/AST/Pretty.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/AST')

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
-- 
cgit v1.2.3-70-g09d2