At 5:24 PM +0200 7/31/98, Christian Sievers wrote:
>Hello,
>
>I'd like to see example uses of hugs 1.3c's rank 2 polymorphism that
>are a bit more usefull than the amazing functions amazed and twice
>from the WhatsNew file. I am also interested in functions that one
>would like to define, but can't because of the restrictions in hugs
>1.3c. Why are they there? Are there implementations of languages with
>more general type systems? Finally, I'd like to get references to the
>theory behind rank 2 polymorphism and existential types.
>
>Thank you,
>Christian Sievers

In my error correcting parser combinators I use the type:

newtype RealParser s a = P (forall  b   d
                            .    (b -> Errs s -> [s] -> Steps d)
                              -> (a -> b)
                              -> Errs s
                              -> [s] -> Steps d
                           )

, which is interesting in the sense that it is quantified over more than
one variable.
For an explanation of the type you may read:
http:/www.cs.uu.nl/groups/ST/Software/Parse/Sofsem99.pdf
Such a type typically arises when you write programs in a continuation
based style.

 Doaitse Swierstra

__________________________________________________________________________
S. Doaitse Swierstra, Department of Computer Science, Utrecht University
                      P.O.Box 80.089, 3508 TB UTRECHT,   the Netherlands
                      Mail:  mailto:[EMAIL PROTECTED]
                      WWW:   http://www.cs.uu.nl/
                      PGP Public Key: http://www.cs.uu.nl/people/doaitse/
                      tel:   +31 (30) 253 3962, fax: +31 (30) 2513791
__________________________________________________________________________


Reply via email to