incompatible signatur syntax within instance definition

Christian Maeder maeder at tzi.de
Tue Dec 9 10:59:32 EST 2003


Fergus Henderson wrote:
> Or were you referring to the fact that variables which are already
> constrained can't be constrained again?  IMHO that is a feature too.
> It doesn't make sense to constrain a variable at any point other than
> the point where that variable is introduced.

Indeed, repeating a constraint should be no error (at most a warning) 
and be it only to let "ghc -fglasgow-exts" except more programs than ghc 
does without extensions. (I once even argued, that keywords for 
extensions should also be reserved for Haskell98 in order to always 
allow for switching extensions on without changes.)

/home/maeder/haskell/examples/MyList.hs:10:
     Warning: Duplicate class assertion `Show a' in the context:
		 (Show a, Show a) => ...

Cheers Christian



More information about the Glasgow-haskell-users mailing list