[ ghc-Bugs-755726 ] mutiparameter classes problem
SourceForge.net
noreply at sourceforge.net
Fri Jun 20 06:03:16 EDT 2003
Bugs item #755726, was opened at 2003-06-17 06:24
Message generated for change (Comment added) made by simonpj
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=755726&group_id=8032
Category: Compiler (Type checker)
Group: 6.0
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: mutiparameter classes problem
Initial Comment:
hello,
i have run into something that looks like a bug in ghc 6.0.
here is an example:
> module A where
> class C a b where f :: a -> b
> g x = fst (f x)
for this program hugs reports that "g" has an ambiguous
type:
C a (b,c) => a -> b
which seems reasonable.
however ghc does not report an error, and infers the
following type:
C a (b, ()) => a -> b
(i have changed the formatting for easier comparing).
it seems that somehow the second component of the tuple
became (),
but i don't see why.
bye
iavor
----------------------------------------------------------------------
>Comment By: Simon Peyton Jones (simonpj)
Date: 2003-06-20 10:03
Message:
Logged In: YES
user_id=50165
Quite right. A bug in TcSimplify which I have now fixed.
Thank you
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=755726&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list