on master help sign in
Insert space before double dot of arithmetic sequence

This style is arguably ugly, but solves the issue when the type signatures mess with the double dot. Will do for now.

commit2cae331d1b354893b304ffb234a74cb0466b5e61 authorDaniel Krueger <danielkrueger@protonmail.com> dateSun 14 Jul 2019, 17:11 (7 years ago) parent63478a0
3 files changed+21−6
data/examples/declaration/value/function/arithmetic-sequences-out.hs+12−2 data/examples/declaration/value/function/arithmetic-sequences.hs+5 src/Ormolu/Printer/Meat/Declaration/Value.hs+4−4
data/examples/declaration/value/function/arithmetic-sequences-out.hs+12−2
@@ -1,4 +1,6 @@
1−foo = [0..]
1+foo = [0 ..]
2+
3+foo' = [0 .. 5]
24
35bar x =
46 [ 0
@@ -11,4 +13,12 @@ baz x =
1113 .. x
1214 ]
1315
14−barbaz x = [0, 1..]
16+barbaz x = [0, 1 ..]
17+
18+arst = [0 :: Int ..]
19+
20+brst = [0, 1 :: Int ..]
21+
22+crst = [0 :: Int .. 10]
23+
24+drst = [0, 1 :: Int .. 10]
data/examples/declaration/value/function/arithmetic-sequences.hs+5
@@ -1,4 +1,5 @@
11foo = [0..]
2+foo' = [0..5]
23bar x = [
34 0..x
45 ]
@@ -8,3 +9,7 @@ baz x = [
89 x
910 ]
1011barbaz x = [ 0, 1.. ]
12+arst = [0 :: Int ..]
13+brst = [0, 1 :: Int ..]
14+crst = [0 :: Int .. 10]
15+drst = [0, 1 :: Int .. 10]
src/Ormolu/Printer/Meat/Declaration/Value.hs+4−4
@@ -581,20 +581,20 @@ p_hsExpr = \case
581581 case x of
582582 From from -> brackets $ do
583583 located from p_hsExpr
584− breakpoint'
584+ breakpoint
585585 txt ".."
586586 FromThen from next -> brackets $ do
587587 velt (withSep comma (located' p_hsExpr) [from, next])
588− breakpoint'
588+ breakpoint
589589 txt ".."
590590 FromTo from to -> brackets $ do
591591 located from p_hsExpr
592− breakpoint'
592+ breakpoint
593593 txt ".. "
594594 located to p_hsExpr
595595 FromThenTo from next to -> brackets $ do
596596 velt (withSep comma (located' p_hsExpr) [from, next])
597− breakpoint'
597+ breakpoint
598598 txt ".. "
599599 located to p_hsExpr
600600 HsSCC NoExt _ name x -> do