Closed wismill closed 1 year ago
Note: fourmolu
does not support this fix and suppresses the spaces in ( #<| )
. See tweag/ormolu#1062.
For now, I use fourmolu
’s special comments to disable formatting at the corresponding lines.
Thanks, interesting!
Could you please mention the caveat about spaces around ( #<| )
in documentation? Lest users are tricked the same way I was.
I'm a bit reluctant to accumulate pragmas and would rather wait for Ormolu / Formolu to fix the formatting issue.
Could you please mention the caveat about spaces around
( #<| )
in documentation?
I added a mention about the caveat in the doc and in the code.
Lest users are tricked the same way I was.
I discovered this caveat by mere curiosity: GHC had no issue with a #<| b
but had with (#<|)
. So it is indeed not obvious!
I'm a bit reluctant to accumulate pragmas and would rather wait for Ormolu / Formolu to fix the formatting issue.
Agreed. I reduced to only one comment at the beginning of the file. A fix is already in the work, see tweag/ormolu#1063. I do not think you should wait for a formatting tool to be fixed to merge this PR, as it introduces a deprecation in a young library: the sooner you release, the lesser users will need migration.
Rebased. I tested with success formatting with fourmolu
using the patch at tweag/ormolu#1063.
Waiting for https://github.com/fourmolu/fourmolu/pull/369 to be released.
I removed the commit with the special Fourmolu comments.
Previously the documentation stated that
(#<|)
was not supported by the parser. It turns out it is a silly interaction with-XUnboxedTuples
. Adding extra spacing between the parentheses and the function fixes the issue.This commit adds
(#<|)
and makes(<|#)
its deprecated alias.