: We try to please. How about this?
:
: Simon
:
:
: Marc.hs:7:
: Cannot unify the type-signature variable `p' with the type `[]'
: Expected type: [a]
: Inferred type: p a1
: In the first argument of `ci', namely `a'
: In the scrutinee of a case expression: ci a
Great!
Regards,
Marc
:
: > -----Original Message-----
: > From: Marc van Dongen [mailto:[EMAIL PROTECTED]]
: > Sent: Thursday, April 15, 1999 6:01 PM
: > To: Simon Peyton-Jones
: > Subject: Re: Proposal for error message improvement
: >
: >
: > : "I would have found it much more helpful if GHC had printed
: > : the following message ..."
: > : concerning the example below.
: > : > > class C p a where
: > : > > ci :: p a -> p a
: > : >
: > : > > f :: (C p a) => (p a) -> (p a)
: > : > > f a = case ci a of
: > : > > [] -> a
: >
: >
: > Proposal.lhs:6:
: > Inferred type is less polymorphic than expected
: > Quantified type variable `p' is unified with `[]'
: > When checking the type signature
: > f :: forall p1 a1. {C p1 a1} => p1 a1 -> p1 a1
: >
: > is fine this tells you what is wrong. Additionally
: > information about a libe number where about there is
: > some ``obvious'' problem. E.g.
: >
: > because the type of ``ci a'' and ``[]'' in the code-fragment
: > ``case ci a of
: > [] -> a''
: > in lines 7 and 8 cannot be unified.
: >
: > alternatively
: >
: > because the types of ``[]'' and ``a'' in the code-fragment
: > ``case ci a of
: > [] -> a''
: > in lines 7 and 8 cannot be unified.
: >
: > alternatively
: >
: > because the type of expression ``[]'' in the code-fragment
: > ``case ci a of
: > [] -> a''
: > in lines 7 and 8 is too speciffic.
: >
: >
: > Anything else wil do as well, as long as lines 7 and 8
: > are mentioned:-)