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
Maybe one subsumes the other?
What I want to know is if there is an easy way to emulate one with the
other, and how much convenience is lost in doing so.
For instance, is it possible to implement stream fusion with rank2
types, or the ST monad with existantials?
Is there any paper discussing
Thank you, everyone. You have addressed my concerns very accurately.
So in short, higer rank types subsume existentials. Good. And the burden
of emulating existentials can be lowered by a suitable macro system.
Very good.
2008/11/9 Derek Elkins [EMAIL PROTECTED]:
There are various rules for
On Sun, 2008-11-09 at 13:46 +0100, Loup Vaillant wrote:
Maybe one subsumes the other?
What I want to know is if there is an easy way to emulate one with the
other, and how much convenience is lost in doing so.
For instance, is it possible to implement stream fusion with rank2
types, or
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