Don't use newlines on LambdaCases on single-line layouts
commit76ce40df7fc307aa877382190ce5534e7a409b59
authorUtku Demir <me@utdemir.com>
dateFri 30 Aug 2019, 14:53 (7 years ago)
parentd74b211
data/examples/declaration/value/function/lambda-case-out.hs+2
@@ -1,5 +1,7 @@
11{-# LANGUAGE LambdaCase #-}
22
3+foo = bar (\case JKey {} -> True; _ -> False)
4+
35foo :: Int -> Int
46foo = \case
57 5 -> 10
data/examples/declaration/value/function/lambda-case.hs+2
@@ -1,5 +1,7 @@
11{-# LANGUAGE LambdaCase #-}
22
3+foo = bar (\case JKey{} -> True; _ -> False)
4+
35foo :: Int -> Int
46foo = \case
57 5 -> 10
src/Ormolu/Printer/Meat/Declaration/Value.hs+1−1
@@ -493,7 +493,7 @@ p_hsExpr = \case
493493 p_matchGroup Lambda mgroup
494494 HsLamCase NoExt mgroup -> do
495495 txt "\\case"
496− newline
496+ breakpoint
497497 inci (p_matchGroup LambdaCase mgroup)
498498 HsApp NoExt f x -> sitcc $ do
499499 located f p_hsExpr