> > > Is there any Haskell implementation that supports > > > extensible data types, in which new value constructors > > > can be added to a previously declared data type? > > > > I think this is what TREX (extensible records) in Hugs are about. Take > > a look at > > > > http://www.cse.ogi.edu/PacSoft/projects/Hugs/pages/hugsman/exts.html > The TREX extension enable the addition of new fields to a record type. > What I am looking for is a way of extending a data type with > new forms of values, and not a given value form with new "fields". > Yes, ok. I agree. But couldn't you say something like data Expr = Int Integer | Cte String | Var String | App (Rec ()) and extend the record in the last constructor by a label sum:: (Expr,Expr), pro::(Expr,Expr) etc.? Axel.
- Extensible data types? Jose Romildo Malaquias
- Re: Extensible data types? Peter Ljunglof
- Re: Extensible data types? Carl R. Witty
- Re: Extensible data types? S.J.Thompson
- Re: Extensible data types? Axel Simon
- Re: Extensible data types? Jose Romildo Malaquias
- Re: Extensible data types? Ch. A. Herrmann
- Re: Extensible data types? Jose Romildo Malaquias
- Re: Extensible data types? Axel Simon
- Re: Extensible data types? Rob MacAulay
- RE: Extensible data types? Chris Angus
- Re: Extensible data types? John Hörnkvist
- Re: Extensible data types? Jose Romildo Malaquias
- Re: Extensible data types? Peter Achten
- Re: Extensible data types? Keith Wansbrough
- RE: Extensible data types? Chris Angus
- Re: Extensible data types? Jose Romildo Malaquias
- Re: Extensible data types? Peter Achten
- Re: Extensible data types? Jose Romildo Malaquias