Ryan Ingram schrieb:

> There's a natural relation between higher rank types and existentials;
> one way to think about it is this: if you have some existential type t
> (subject to some constraints), you cannot operate on it except with
> some function that accepts any type t subject to those constraints.
> 
> There is a simple encoding of existential types using higher rank types:
> 
> Given
>> data E a1..an = forall e1...en. (constraints) => E t1..tn
> where t1..tn are types in terms of a1..an, we replace with
>> data E' a1..an = E' (forall b. (forall e1..en. t1 -> t2 -> ... -> tn -> b) 
>> -> b)

Can you please put this on the Wiki?
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to