[Bug #131855] class C a b | a -> b; (C a b, Eq b) => a -- not legal

Simon Peyton-Jones simonpj@microsoft.com
Tue, 13 Feb 2001 16:36:00 -0800


It's fixed in my version.  I'm not quite sure exactly where
this bug was, but it's gone away.  I havn't commited yet,
I'm afrait (on the road)

Thanks for reporting it

Simon

| -----Original Message-----
| From: noreply@sourceforge.net [mailto:noreply@sourceforge.net]
| Sent: 10 February 2001 19:07
| To: qrczak@knm.org.pl; noreply@sourceforge.net; cvs-ghc@haskell.org
| Subject: [Bug #131855] class C a b | a -> b; (C a b, Eq b) => a -- not
| legal
| 
| 
| Bug #131855, was updated on 2001-Feb-10 11:07
| Here is a current snapshot of the bug.
| 
| Project: The Glasgow Haskell Compiler
| Category: Compiler (Type checker)
| Status: Open
| Resolution: None
| Bug Group: None
| Priority: 5
| Submitted by: qrczak
| Assigned to : nobody
| Summary: class C a b | a -> b; (C a b, Eq b) => a -- not legal
| 
| Details: The following fragment is not accepted:
| 
| class C a b | a -> b where f :: a -> b
| g :: (C a b, Eq b) => a -> Bool
| g x = f x == f x
| 
|     Ambiguous type variable(s) `b' in the constraint `Eq b'
|     arising from use of `==' at Test.hs:4
|     In the right-hand side of an equation for `g': (f x) == (f x)
| 
| Hugs accepts it.
| 
| 
| For detailed info, follow this link:
| http://sourceforge.net/bugs/?func=detailbug&bug_id=131855&grou
p_id=8032

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc