Closed mitchellwrosen closed 7 months ago
In cases where I actually do want the comment to go after the then/else, the block is de-indented:
Desired:
main =
if x
then
-- asdf
-- asdf
case x of
True -> _
else
-- asdf
-- asdf
case x of
True -> _
Actual:
main =
if x
then -- asdf
-- asdf
case x of
True -> _
else -- asdf
-- asdf
case x of
True -> _
Hi, I'm not sure if the AST would allow us to do this, but it would be great if this formatting of comment placement was preserved by ormolu:
When formatted, this looks like
One workaround is to place comments at the top of each alternative, which is okay, but seems a little less natural.
Thanks!