[Haskell-cafe] Downside of -fglasgow-extensions
Henning Thielemann
lemming at henning-thielemann.de
Wed Nov 28 06:08:30 EST 2007
On Wed, 28 Nov 2007, manu wrote:
> Hello,
>
> I'm trying to build diverse packages from Hackage with ghc 6.8.1,
> they usually fail to build because of missing language extensions.
>
> Sometimes I am unable to determine the proper name of the extension
> missing in .cabal
> I tend to slap {- #OPTIONS -fglasgow-exts #-} at the top of the
> troublesome file.
> It works, but out of curiosity, what is the downside of such an
> approach ? (bigger executables ?)
Mistakes can slip through more easily. Things that aren't allowed in
Haskell 98 are now accepted, although they might just be mistakes. E.g.
when switched on glasgow-exts the compiler accepts
type List = []
Although not wrong, it is not Haskell 98 and can be easily replaced by
type List a = [a]
I wrote definitions like the former one several times, before becoming
aware that they use a language extension.
More information about the Haskell-Cafe
mailing list