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
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).
for ghc, check this: http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html (i think) most of this is implemented in hugs as well. with ghc, you need `ghc -fglasgow-exts', with hugs, use `hugs -98'. -- -- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ -- -- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/207 --
participants (2)
-
Chiyan Chen -
Johannes Waldmann