on master help sign in
Print multiline comments without changing the contents
c3d69d5Utku Demir
data/examples/declaration/value/function/operators-out.hs+5
@@ -7,6 +7,11 @@ main =
7 $ baz -- bar
7 $ baz -- bar
8 -- baz
8 -- baz
9
9
10+bar
11+ $ {- foo
12+ -}
13+ bar
14+
10f =
15f =
11 Foo <$> bar
16 Foo <$> bar
12 <*> baz
17 <*> baz
data/examples/declaration/value/function/operators.hs+5
@@ -6,6 +6,11 @@ main =
6 bar $ -- bar
6 bar $ -- bar
7 baz -- baz
7 baz -- baz
8
8
9+bar $
10+ {- foo
11+ -}
12+ bar
13+
9f =
14f =
10 Foo <$> bar
15 Foo <$> bar
11 <*> baz
16 <*> baz
src/Ormolu/Printer/Comments.hs+1−1
@@ -221,6 +221,6 @@ commentFollowsElt ref mnSpn meSpn mlastSpn (L l comment) =
221
221
222spitComment :: Comment -> R ()
222spitComment :: Comment -> R ()
223spitComment =
223spitComment =
224− sequence_ . NE.intersperse newline . fmap f . coerce
224+ sitcc . sequence_ . NE.intersperse newline . fmap f . coerce
225 where
225 where
226 f x = ensureIndent >> spit (T.pack x)
226 f x = ensureIndent >> spit (T.pack x)