Dear implementors,
Consider the following silly module definition:
> module Proposal( C ) where
> class C p a where
> ci :: p a -> p a
> f :: (C p a) => f (p a) -> f (p a)
> f a = case ci a of
> [] -> a
Compiling this leads to the following (ghc-4.02):
Proposal.lhs:6:
Inferred type is less polymorphic than expected
Quantified type variable `f' is unified with `[]'
When checking the type signature
f :: forall f1 p1 a1. {C p1 a1} => f1 (p1 a1) -> f1 (p1 a1)
Here it is not difficult to see what causes the problem.
However, the more equations there are in the definition
of a function, the more difficult I have found it to locate
the cause of errors resulting in error messages as the one
above.
Would it be possible to provide an explanation as to what
could have caused such errors?
Regards,
Marc van Dongen