Question about using higher order polymorphism.

Chiyan Chen chiyan@cs.bu.edu
Tue, 15 Apr 2003 19:02:25 -0400 (EDT)


Hi, 

I am a ph.d student working in the area of typed programming
langauges.  And I am a happy Haskell user.  Recently I am working on
something that involves some advanced Haskell features.  So I write to
this mailing list to ask for help.

My question is, in which version of Haskell can I use higher order
polymorphism features (including first class polymorphic and first class
existential types), and how to use them (what's the syntax).  Is there any
special packages or libraries that I need to install for using these
features.

For example, how should I define the following types:

data T a b = TC (exists c. (a -> c, c -> b))

data B = BC (forall a. a -> a -> a)

or more complex:

data T b = TC (exist c. forall b. (a -> c, c -> b))

Thank you for you help.

--
Chiyan Chen