Closed seagreen closed 3 years ago
As a quick fix I could switch long lines with repeated operators to not be split into separate lines.
It looks like the long term fix will be for use Foo
to sometimes indent following lines and sometimes not, right now the parser requires this. Or the parser could be changed.
Another example, I think it's the same bug though.
part2.hasTwoEqualAdjacent.test : [Result]
part2.hasTwoEqualAdjacent.test =
use part2 hasTwoEqualAdjacent
use test ==
Test.run
<| v1.tests
[ hasTwoEqualAdjacent [1, 1, 2, 2, 3, 3] == true,
hasTwoEqualAdjacent [1, 2, 3, 4, 4, 4] == false,
hasTwoEqualAdjacent [1, 1, 1, 1, 2, 2] == true,
hasTwoEqualAdjacent [1, 1, 1, 1] == false,
hasTwoEqualAdjacent [1, 1, 1, 1, 1] == false ]
fyi, here's how ormolu
(Haskell formatter) would pretty-print these
"aaaaaaaaaaaaaaaaaaaaaa" ++ "bbbbbbbbbbbbbbbbbbbbbb" ++
"cccccccccccccccccccccc"
part2.hasTwoEqualAdjacent.test : [Result]
part2.hasTwoEqualAdjacent.test =
use part2 hasTwoEqualAdjacent
use test ==
Test.run <|
v1.tests
[ hasTwoEqualAdjacent [1, 1, 2, 2, 3, 3] == true
, hasTwoEqualAdjacent [1, 2, 3, 4, 4, 4] == false
, hasTwoEqualAdjacent [1, 1, 1, 1, 2, 2] == true
, hasTwoEqualAdjacent [1, 1, 1, 1] == false
, hasTwoEqualAdjacent [1, 1, 1, 1, 1] == false
]
The codebase slurps this in fine:
But it pretty prints it as:
And that won't go back in:
(This is with
ucm version: release/M2-base-329-gd3611ffd
)