suggestion: add a .ehs file type

Wolfgang Jeltsch g9ks157k at
Wed Nov 21 10:17:52 EST 2007

Am Dienstag, 20. November 2007 22:35 schrieb Alex Jacobson:
> […]

> {-# LANGUAGE TemplateHaskell, FlexibleInstances,
>               OverlappingInstances, UndecidableInstances, CPP,
>               ScopedTypeVariables, PatternSignatures, GADTs,
>               PolymorphicComponents, FlexibleContexts,
>               MultiParamTypeClasses, DeriveDataTypeable,
>               PatternGuards #-}
> FYI, I grabbed the above from a source file that had been upgraded to
> 6.8 in which I kept adding pragmas until it compiled.  Forcing the user
> to do this sort of thing manually every time they write code is
> ridiculous.  

It made me discover that I use more language extensions than I thought I was 

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?

> Taken to its logical conclusion, why don't we also add "RecordSyntax"
> and "DoSyntax" etc. 

Because they are part of the standard.  If Haskell' will be released at some 
point in the future, we won’t have to include MultiParamTypeClasses, 
Concurrency, etc. into our LANGUAGE pragmas.

> 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.

> […]

> -Alex-

Best wishes,

More information about the Glasgow-haskell-users mailing list