[commit: ghc] master: Be consistent with placement of Safe Haskell mode at top of file (2a523eb)

David Terei d at davidterei.com
Fri Nov 21 21:37:24 UTC 2014

Necessary is a strong statement, it's obviously not as it's style.

I personally think it's better to have Safe Haskell pragmas at the top
as they aren't like other pragmas, they don't just turn something on
but make a hard statement about the module in question. As such it
seems better to me to keep them at the top to retain this distinction
from other pragmas.

If you feel or others a different style is better, that's fine. There
isn't any consistent style with pragmas so I introduced one. If
considering my argument above you prefer alphabetical then feel free
to revert the patch. It would be nice if we had a consistent style
though with pragmas. I don't care strongly what it is, just that it


On 21 November 2014 13:30, Herbert Valerio Riedel <hvr at gnu.org> wrote:
> Hello David,
> On 2014-11-21 at 22:03:23 +0100, git-4Dsf34iY/NkouOHNgZ69ag at public.gmane.org wrote:
> [...]
>> commit 2a523ebf091478aea39deef28073320bed628434
>> Author: David Terei <code-A0igW9AEfH2M2ScGVVA7yQ at public.gmane.org>
>> Date:   Wed Nov 19 18:29:51 2014 -0800
>>     Be consistent with placement of Safe Haskell mode at top of file
> Why is that necessary?
> Fwiw, I'm afraid that's gonna be hard to retain; it's more
> obvious/easier to keep all LANGUAGE pragmas in alphabetic order (I've
> probably done that a couple of times in `base` deliberately myself) than
> to introduce such an artificial ordering on the language pragmas.
> The reason is, you can instruct an editor to select the first paragraph
> which comprises the block of one-per-line language-pragmas is, and have
> it sorted it alphabetically. That's just a few keystrokes. But it's
> rather difficult to teach the editor to use an ordering relation other
> than the usual alphabetic/lexicographic ordering.
> Cheers,
>   hvr
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs

More information about the ghc-devs mailing list