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

Philippa Cowderoy flippa at flippac.org
Fri Apr 29 08:18:23 EDT 2005

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 - I'm slowly piecing together a paper, 
though personal circumstances're causing this to take quite some time 
(#haskellers will have heard much of this before in chan). If you avoid 
doing anything too strenuous with records and maintain some reasonably 
simple restrictions, you only need annotations to disambiguate 'multiple 
inheritance'-like scenarios and _ patterns.

flippa at flippac.org

"My religion says so" explains your beliefs. But it doesn't explain 
why I should hold them as well, let alone be restricted by them.

More information about the Haskell-Cafe mailing list