bug with rank n polymorphism in classes
Hal Daume III
hdaume at ISI.EDU
Sun Sep 1 09:27:23 EDT 2002
5.04 for solaris (but it doesn't seem to work in the linux version,
either).
--
Hal Daume III
"Computer science is no more about computers | hdaume at isi.edu
than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
On Wed, 28 Aug 2002, Simon Peyton-Jones wrote:
> 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:hdaume at ISI.EDU]
> | Sent: 22 August 2002 20:47
> | To: glasgow-haskell-bugs at haskell.org
> | 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 | hdaume at isi.edu
> | than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
> |
> | _______________________________________________
> | Glasgow-haskell-bugs mailing list
> | Glasgow-haskell-bugs at haskell.org
> | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs
> |
>
More information about the Glasgow-haskell-bugs
mailing list