suggestion: add a .ehs file type

Simon Peyton-Jones simonpj at
Thu Nov 22 03:40:01 EST 2007


| Ok, I'm game to default to haskell98 in the presence of ambiguity, but
| in most cases the extension involves new syntax and that should be enough.

Trying to compile the program both ways (or 2^n ways) to check for ambiguity sounds like  a pretty heavy hammer to crack this nut.

GHC is a Haskell-98 compiler by default, and I think it's a good default.  You are arguing to change the default, but that's always an uphill battle because there will be others with good user-based reasons (like yours) for preferring the current default.

Better would be to make it easy to get what you want.  It is certainly useful to have a name for a bundle of flags.  Currently -O, -O2, and -fglasgow-exts, and -Wall are the only such names.

But we don't currently have a "switch on all extensions" flag, -Xall say.  If you'd find that useful, you could put {-# OPTIONS_GHC -Xall #-} at the top of all your modules, and you'd be done.  In situations where you didn't want a particular extension (like Duncan's example) you can switch it off selectively with -XNoBangPatterns.


More information about the Glasgow-haskell-users mailing list