Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit fbb5688

Browse files
committed
Use the top-level definition of with.
1 parent d7e4f21 commit fbb5688

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

semantic-core/src/Data/Core/Pretty.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ prettyCore style = run . runReader @Prec 0 . go (pure . name)
6464
Let a -> pure $ keyword "let" <+> name a
6565
a :>> b -> do
6666
prec <- ask @Prec
67-
fore <- with 12 a
68-
aft <- with 12 b
67+
fore <- with 12 (go var a)
68+
aft <- with 12 (go var b)
6969

7070
let open = symbol ("{" <> softline)
7171
close = symbol (softline <> "}")
@@ -106,8 +106,7 @@ prettyCore style = run . runReader @Prec 0 . go (pure . name)
106106

107107
-- Annotations are not pretty-printed, as it lowers the signal/noise ratio too profoundly.
108108
Ann _ c -> go var c
109-
where with n m = local (const (n :: Prec)) (go var m)
110-
bind (Ignored x) f = let x' = name x in (,) x' <$> go (incr (const (pure x')) var) (fromScope f)
109+
where bind (Ignored x) f = let x' = name x in (,) x' <$> go (incr (const (pure x')) var) (fromScope f)
111110
lambda = case style of
112111
Unicode -> symbol "λ"
113112
Ascii -> symbol "\\"

0 commit comments

Comments
 (0)