I have a datatype which looks like:
data T c d f g = forall a. T ...
and I want to make it an instance of a class C:
instance (C c, C d) => C (T c d) where ...
However, Hugs98 (newest version) gives me an error:
Illegal type in class constraint
which I have determined does not arise from the constraint (the "(...)=>"
part) but from the "head" Cat (T c d), since I can comment out the
constraint and get the same error.
This error message is not very informative, so I'm guessing there is some
rule that types with locally quantified constructors must be fully applied
in instance heads. Is that correct? Incidentally, all the arguments to T are
also type functions, in case it matters.
Haven't tried this on GHC yet.
--FAC