on master help sign in
Output space using ‘space’ in ‘sepSemi’
commitc84eaa9f7a8acf7d8d16d2052d266d95108a648b authorMark Karpov <markkarpov92@gmail.com> dateWed 27 May 2020, 15:51 (6 years ago) parent2ed76cc
1 file changed+6−4
src/Ormolu/Printer/Combinators.hs+6−4
src/Ormolu/Printer/Combinators.hs+6−4
@@ -174,10 +174,12 @@ sepSemi f xs = vlayout singleLine multiLine
174174 xs' ->
175175 if ub
176176 then do
177− txt "{ "
178− sep (txt "; ") (dontUseBraces . f) xs'
179− txt " }"
180− else sep (txt "; ") f xs'
177+ txt "{"
178+ space
179+ sep (txt ";" >> space) (dontUseBraces . f) xs'
180+ space
181+ txt "}"
182+ else sep (txt ";" >> space) f xs'
181183 multiLine =
182184 sep newline (dontUseBraces . f) xs
183185