[Haskell-cafe] Polymorphic variants
Jon Harrop
jon at ffconsultancy.com
Thu Aug 2 13:32:33 EDT 2007
On Thursday 26 July 2007 00:07:23 Josef Svenningsson wrote:
> On 7/26/07, Jon Harrop <jon at ffconsultancy.com> wrote:
> > Does Haskell have anything similar to OCaml's polymorphic variants?
>
> No as such, but it's possible to simulate them. As always Oleg was the
> one to demonstrate how:
> http://okmij.org/ftp/Haskell/generics.html
Thank you.
Is there any interest in adding polymorphic variants to Haskell? I think it is
fair to say that OCaml has shown them to be an extremely useful construct
(more common than objects in OCaml, for example).
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e
More information about the Haskell-Cafe
mailing list