GHC, functional dependency, rank-2 type

oleg at oleg at
Tue Jan 13 11:24:31 EST 2004

John Tromp wrote:
> >>instance (Bar a) => Foo a

> I have tried to write code myself like in the last line,
> stating that any instance of one class should also be
> an instance of another class. But Hugs would complain about
> it.

You're right. Hugs needs to be told that the code is in an extended
Haskell, with popular extensions. Therefore, Hugs has to invoked as
"hugs -98". It seems -98 flag cannot be changed once the Hugs is
running. Incidentally, the previously posted code included rank-2
types -- which are flagrantly not in Haskell98. Therefore, without -98
flag, Hugs will have a lot to complain about.

More information about the Haskell mailing list