On Mon, Sep 25, 2000 at 01:01:25PM +0200, Axel Simon wrote:
> On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote:
> 
> > 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 the TREX (extensible records) in Hugs are about. Take
> a look at
> 
> http://www.cse.ogi.edu/PacSoft/projects/Hugs/pages/hugsman/exts.html
> 
> section 7.2.

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".

The TREX extension would allow something like (with an inventend syntax):

        data T = V { field1 :: Integer
                   , field2 :: Double
                   }
        ...
        extend data T = V  { field3 :: Char
                           , field4 :: [Integer]
                           , field5 :: Bool
                           }

which would extend the value constructor V for the data type T
introducing new fields.

This does not help me in my project.

Romildo
-- 
Prof. Jos� Romildo Malaquias <[EMAIL PROTECTED]>
Departamento de Computa��o
Universidade Federal de Ouro Preto
Brasil

Reply via email to