higher rank polymorphism
Tomasz Zielonka
tomasz.zielonka at gmail.com
Thu Nov 16 07:33:10 EST 2006
On Wed, Nov 15, 2006 at 01:20:43PM +0100, Jan Christiansen wrote:
> I want to use a rank 2 data type and end up in typ problems that I
> don't understand. I would really appreciate any hints to the
> presented cases or pointers to interesting papers that address the
> background of these problems.
>
> I define the following datatype and a simple function that checks
> whether the list is empty.
>
> data Test = Test (forall a . [a -> a])
I would work, if you used existential quantification, but I am don't
know if it would be what you want:
data Test = forall a . Test [a -> a]
I don't know why you current code doesn't work - sorry.
Best regards
Tomasz
More information about the Glasgow-haskell-users
mailing list