Please say which version of GHC you are using.

This program works fine with GHC 5.02.2

Simon

| -----Original Message-----
| From: Hal Daume III [mailto:[EMAIL PROTECTED]] 
| Sent: 22 August 2002 20:47
| To: [EMAIL PROTECTED]
| Subject: bug with rank n polymorphism in classes
| 
| 
| consider:
| 
| module Foo where
| 
| class Foo p where
|     foo :: p -> (forall q . Foo q => q -> a) -> a
| 
| instance Foo Int where
| 
| 
| if you load this in to ghci, it complains:
| 
| /home/hdaume/projects/NLP/Foo.hs:6:
|     Ambiguous type variable(s) `q' in the constraint `Foo q'
|     arising from a function with an overloaded argument type 
| at /home/hdaume/projects/NLP/Foo.hs:6
|       Expected type: Int -> (forall q1. (Foo q1) => q1 -> a) -> a
|       Inferred type: Int -> (q -> a) -> a
|     In the application `GHC.Err.noMethodBindingError 
| "/home/hdaume/projects/NLP/Foo.hs:6|Foo.foo"#'
| 
| which is a reasonable complaint, but is emiited in a rather 
| bizzare way.
| 
| --
| Hal Daume III
| 
|  "Computer science is no more about computers    | [EMAIL PROTECTED]
|   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
| 
| _______________________________________________
| Glasgow-haskell-bugs mailing list 
| [EMAIL PROTECTED] 
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs
| 
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to