Open michaelpj opened 4 years ago
This is the first time I see pragmas placed like this. To me this is very low priority, you probably should just put the pragmas in more conventional locations, that is, any location without putting Haddocks between the pragma and the declaration.
I can of course put them somewhere else, but I don't think that it's an especially weird place to put them. They're comments that talk about the function, there's no obvious reason either they or the Haddocks should come first.
(And not to snark, but a small amount of searching turned up https://github.com/tweag/linear-types/blob/8c3f95fc9fe8f843b71f96b4c8d6e8a2bb5fecfa/Examples/src/Cursors/PureStorable.hs#L59 amongst others :) )
Yeah, all I say is that it's relatively low priority.
This gets left as it is:
But this gets reformatted:
to
It's also left alone if I change the Haddock comment into a non-Haddock comment.
I think the pragma belongs "with" the declaration. This seems to happen in the cases where there isn't a Haddock comment, and I don't think having one should change it.