ormolu
ormolu copied to clipboard
Support for literate Haskell
Is your feature request related to a problem? Please describe. Looks like ormolu does not support literate Haskell, see details.
Describe the solution you'd like Able to format literate Haskell.
Describe alternatives you've considered N/A
Additional context I'm new to Haskell so not familiar with the tooling. I guess there's certain reasons we do not support literate Haskell? If so, are there other tools can be used?
Thanks for the suggestion! I think implementing support for Literate Haskell should be feasible (ie as supported by the unlit
program shipped with GHC), such that eg
# A Literate Haskell File
Some imports
> import B
> import A
Very interesting code:
> data A = B
is formatted to
# A Literate Haskell File
Some imports
> import A
> import B
Very interesting code:
> data A = B
Is that what you are having in mind?
@amesgen Yes! Formatting the code parts in literate Haskell is exactly what I mean, sorry for not clearly specifying it. BTW, may I ask the reason why this snippet
> import A
> import B
should be formatted to this one?
> import B
> import A
Ah, thanks for pointing that out, that was just a mistake, it should be exactly reversed, I edited the comment :+1: