[Haskell-cafe] RFE: Extensible algebraic user-defined data types?

Jacques Carette carette at mcmaster.ca
Fri Apr 29 08:56:42 EDT 2005

Philippa Cowderoy <flippa at flippac.org> wrote:
> On Fri, 29 Apr 2005, Simon Peyton-Jones wrote:
> > 2.  Use sub-typing, so that a value (Left x) is *both* in type Either
> > and in type NEither.  This opens a very large and complicated design
> > space, as Ben mentioned.
> I've been playing with this design space for a while and think there's at least one reasonable solution in it

What about "polymorphic variants" [1] ?  They are definitely in the solution space, and work very well in Ocaml.


[1] multiple papers, all downloadable from http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/

More information about the Haskell-Cafe mailing list