[nhc-bugs] Type synonyms

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 26 Sep 2001 16:57:48 +0100


> nhc doesn't like the following program ...
> 
> > type Option = Maybe
> 
> > f :: Option a -> Maybe a
> > f =  id

Yes, nhc98's type checker doesn't do kind inference, so the definition
of a type synonym must have the same kind as all its uses.

> The problem disappears if we change the type definition to
> 
> > type Option a = Maybe a

Indeed.

Regards,
    Malcolm