Improve formatting of multi-line literals (#1569)

Fixes https://github.com/dhall-lang/dhall-haskell/issues/1566

This changes multi-line literals so that they can be formatted independently
of their surrounding expression
This commit is contained in:
Gabriel Gonzalez 2019-11-23 14:29:46 -08:00 committed by mergify[bot]
parent d7cd30d2ce
commit ff4e1d7028
3 changed files with 5 additions and 1 deletions

View File

@ -1092,7 +1092,7 @@ prettyCharacterSet characterSet expression =
| anyText (== '\n') =
if not (null a) || anyText (/= '\n')
then long
else Pretty.flatAlt long short
else Pretty.group (Pretty.flatAlt long short)
| otherwise =
short
where

View File

@ -0,0 +1 @@
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff xxxxxxxxxxxxxxxx "\n"

View File

@ -0,0 +1,3 @@
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
xxxxxxxxxxxxxxxx
"\n"