on master help sign in
Enable checking the ‘tls’ package on CI
d4761bfmrkkrp
data/examples/other/comment-following-preceding-gap-out.hsnew file+6
@@ -0,0 +1,6 @@
1+foo = bar
2+ where
3+ baz = return (quux) -- Foo
4+
5+ -- Bar
6+ meme = gege
data/examples/other/comment-following-preceding-gap.hsnew file+6
@@ -0,0 +1,6 @@
1+foo = bar
2+ where
3+ baz = return (quux) -- Foo
4+
5+ -- Bar
6+ meme = gege
default.nix+1−1
@@ -53,6 +53,7 @@ in {
53 "servant"
53 "servant"
54 "servant-server"
54 "servant-server"
55 "tensorflow"
55 "tensorflow"
56+ "tls"
56 "yesod-core"
57 "yesod-core"
57
58
58 # Comment idempotence issue
59 # Comment idempotence issue
@@ -68,7 +69,6 @@ in {
68 # "pandoc"
69 # "pandoc"
69 # "pipes"
70 # "pipes"
70 # "stack"
71 # "stack"
71− # "tls"
72
72
73 # Missing language extension
73 # Missing language extension
74
74
src/Ormolu/Printer/Internal.hs+3−1
@@ -218,7 +218,9 @@ spit dirty printingComments txt' = do
218 , scDirtyLine = scDirtyLine sc || dirty
218 , scDirtyLine = scDirtyLine sc || dirty
219 , scRequestedDelimiter = RequestedNothing
219 , scRequestedDelimiter = RequestedNothing
220 , scLastCommentSpan =
220 , scLastCommentSpan =
221+ -- NOTE If there are pending comments, do not reset last comment
222+ -- location.
221− if printingComments
223+ if printingComments || (not . null . scPendingComments) sc
222 then scLastCommentSpan sc
224 then scLastCommentSpan sc
223 else Nothing
225 else Nothing
224 }
226 }