on master help sign in
Change formatting of operators and infix constructors
1b287b3mrkkrp
data/examples/declaration/value/function/guards-out.hs+4−4
@@ -6,9 +6,9 @@ foo x
6bar :: Int -> Int
6bar :: Int -> Int
7bar x
7bar x
8 | x == 5 =
8 | x == 5 =
9− foo x
9+ foo x +
10− + foo 10
10+ foo 10
11 | x == 6 =
11 | x == 6 =
12− foo x
12+ foo x +
13− + foo 20
13+ foo 20
14 | otherwise = foo 100
14 | otherwise = foo 100
data/examples/declaration/value/function/if-multi-line-out.hs+4−4
@@ -8,8 +8,8 @@ bar :: Int -> Int
8bar x =
8bar x =
9 if x > 5
9 if x > 5
10 then
10 then
11− foo x
11+ foo x +
12− + 100
12+ 100
13 else
13 else
14− foo x
14+ foo x +
15− + 200
15+ 200
data/examples/declaration/value/function/let-multi-line-out.hs+2−2
@@ -8,5 +8,5 @@ bar :: Int -> Int
8bar x =
8bar x =
9 let z = y
9 let z = y
10 y = x
10 y = x
11− in z
11+ in z +
12− + 100
12+ 100
src/Ormolu/Printer/Meat/Declaration/Pat.hs+3−4
@@ -56,11 +56,10 @@ p_pat = \case
56 braces $ velt (withSep comma (located' p_hsRecField) fields)
56 braces $ velt (withSep comma (located' p_hsRecField) fields)
57 InfixCon x y -> do
57 InfixCon x y -> do
58 located x p_pat
58 located x p_pat
59+ space
60+ p_rdrName pat
59 breakpoint
61 breakpoint
60− inci $ do
61− p_rdrName pat
62− space
63− located y p_pat
62+ inci (located y p_pat)
64 ConPatOut {} -> notImplemented "ConPatOut"
63 ConPatOut {} -> notImplemented "ConPatOut"
65 ViewPat {} -> notImplemented "ViewPat"
64 ViewPat {} -> notImplemented "ViewPat"
66 SplicePat {} -> notImplemented "SplicePat"
65 SplicePat {} -> notImplemented "SplicePat"
src/Ormolu/Printer/Meat/Declaration/Value.hs+3−4
@@ -216,11 +216,10 @@ p_hsExpr = \case
216 located (hswc_body a) p_hsType
216 located (hswc_body a) p_hsType
217 OpApp NoExt x op y -> do
217 OpApp NoExt x op y -> do
218 located x p_hsExpr
218 located x p_hsExpr
219+ space
220+ located op p_hsExpr
219 breakpoint
221 breakpoint
220− inci $ do
221− located op p_hsExpr
222− space
223− located y p_hsExpr
222+ inci (located y p_hsExpr)
224 NegApp NoExt e _ -> do
223 NegApp NoExt e _ -> do
225 txt "-"
224 txt "-"
226 located e p_hsExpr
225 located e p_hsExpr