Downside of -fglasgow-extensions

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 ?) Thanks M

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.

On Wed, Nov 28, 2007 at 12:08:30PM +0100, Henning Thielemann wrote:
type List = [] Although not wrong, it is not Haskell 98
It's valid Haskell 98 as far as I know. Advantages of listing the extensions used are * Cabal knows whether hugs, for example, can compile the package * Assuming hugs can compile it, you don't have to have give a different flag to enable extensions in hugs * It allows us to see, by querying hackage, which extensions are used a lot and which are not used at all. Thanks Ian

emmanuel.delaborde:
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 ?)
Can you list which packages failed to build out of the box? -- Don
participants (4)
-
Don Stewart
-
Henning Thielemann
-
Ian Lynagh
-
manu