You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel that {-# LANGUAGE GHC2021 #-} (and Haskell2010 and Haskell98, but I've never actually seen these used on a per-module basis) should always be bumped to the top of the list of language pragmas. Currently it's just sorted alphabetically with the others. But it's more important than others. I think files are more readable with it at the top, since it leads to a more logical thought process of "this is the base language in use, and then these are the ways in which we differ from that language".
There's already special handling for certain language pragmas, e.g. those beginning No.
The text was updated successfully, but these errors were encountered:
FTR: Previous, similar discussion that inspired that the existing way of sorting of language pragmas: #404
It seems sensible to put GHC2021 and friends at the top; this should be trivial to implement and I don't see any tricky interactions right now.
Also, as an aside, impliedXFlags is now exported, so we could make use of that to avoid hardcoding CUSKs and NoImplicitPrelude (even though those are still the only extensions turned off by other extensions). Or (not sure if this is a good idea) even going further, it could automatically remove language pragmas already implied by other pragmas.
I feel that
{-# LANGUAGE GHC2021 #-}
(andHaskell2010
andHaskell98
, but I've never actually seen these used on a per-module basis) should always be bumped to the top of the list of language pragmas. Currently it's just sorted alphabetically with the others. But it's more important than others. I think files are more readable with it at the top, since it leads to a more logical thought process of "this is the base language in use, and then these are the ways in which we differ from that language".There's already special handling for certain language pragmas, e.g. those beginning
No
.The text was updated successfully, but these errors were encountered: