suggestion: add a .ehs file type

Duncan Coutts duncan.coutts at
Wed Nov 21 19:58:49 EST 2007

On Wed, 2007-11-21 at 19:26 -0500, Alex Jacobson wrote:
> 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.

In these cases ghc does generally give an error message which mentions
which extension it is that you should use. This is actually better than
the case where you forget to import something when ghc doesn't helpfully
tell you which module you forgot to import.

As others have said, one major reason for declaring extensions is for

> Note: I would also argue that extensions that change the meaning of old 
> code are prime-facie a bad idea.  It means that, if you start using the 
> new syntax in your existing code, you have manually to audit your code 
> to make sure nothing else got broken and that is difficult even for 
> experts to do really well.  The example you provide is actually evidence 
> that this bang-pattern extension is probably a bad one.

In general I'd agree. In the case of bang patterns it's actually very
hard to construct examples where the code compiles both ways (and is
actually used).


More information about the Glasgow-haskell-users mailing list