File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ niceLambdaR parent = go
243243 -- e.g., parent = `f \x -> g 3 x`; e = `g 3`.
244244 -- Brackets should be placed around `e` to produce `f (g 3)` instead of `f g 3`.
245245 addBrackets = case parent of
246- Just p -> isApp p && not (isVar e)
246+ Just p -> isApp p && not (isVar e) && not (isLambda e)
247247 Nothing -> False
248248 e' = if addBrackets then mkHsPar e else e
249249 tpl = if addBrackets then " (a)" else " a"
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ f = g \x -> h 3 x -- (h 3)
4343f = g (\x -> h 3 x) -- h 3
4444f = g \x -> (`h` 3) x -- (`h` 3)
4545f = g \x -> h x -- h
46+ f = ($ 42) \_ -> pure ()
4647f = foo (flip op x) -- (`op` x)
4748f = foo (flip op x) -- @Message Use section
4849f = foo (flip x y) -- (`x` y)
You can’t perform that action at this time.
0 commit comments