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
243
243
-- e.g., parent = `f \x -> g 3 x`; e = `g 3`.
244
244
-- Brackets should be placed around `e` to produce `f (g 3)` instead of `f g 3`.
245
245
addBrackets = case parent of
246
- Just p -> isApp p && not (isVar e)
246
+ Just p -> isApp p && not (isVar e) && not (isLambda e)
247
247
Nothing -> False
248
248
e' = if addBrackets then mkHsPar e else e
249
249
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)
43
43
f = g (\x -> h 3 x) -- h 3
44
44
f = g \x -> (`h` 3) x -- (`h` 3)
45
45
f = g \x -> h x -- h
46
+ f = ($ 42) \_ -> pure ()
46
47
f = foo (flip op x) -- (`op` x)
47
48
f = foo (flip op x) -- @Message Use section
48
49
f = foo (flip x y) -- (`x` y)
You can’t perform that action at this time.
0 commit comments