suggestion: add a .ehs file type

Alex Jacobson alex at
Wed Nov 21 15:03:37 EST 2007

Wolfgang Jeltsch wrote:
> It made me discover that I use more language extensions than I thought I was 
> using.

yes, it is likely that many of those extensions are in so many people's 
codes that they are de-facto standards whether they have been written 
into a specification document or not.

> I think, it’s a good thing if you have to be clear about what extensions you 
> use and what you don’t use.  What if someone wants to compile your code with 
> a different compiler which doesn’t support all of GHC’s extensions?

That compiler also won't recognize the pragmas and the code won't 
compiler either way.  Only now you have code that has lots of pragmas in it.

>> The compiler obviously knows which extensions are actually being used
>> when the user uses them.
> I don’t think so.  For example, if you don’t use rank-2 polymorphism and 
> similar things, forall is a perfect name for a type variable.

Actually it probably isn't a great name given the risk that forall may 
appear in a standard some time soon.  But either way, if you are not 
using forall in the context of forall syntax, then the compiler knows 
that and can handle it appropriately.

Proof that the compiler knows which extensions are being used: it can 
compile the program sucessfully when the extension is turned on and not 


More information about the Glasgow-haskell-users mailing list