data label overloading

Serge D. Mechveliani mechvel at
Tue Jan 13 15:47:30 EST 2004

Dear Haskellers,

It is desirable to have shorter names for the data labels.

Making a module out of a labeled data declaration does not look
Providing the corresponding class operation is not always convenient.

Maybe, future Haskell language could apprehend some special construct, 
like, say, in the following example

  data Foo1 = Foo1 {size :: Int ...}
  data Foo2 = Foo2 {size :: Int ...}
  f x y z = let size = Foo1..size 
            (size x) + (size y) + (Foo2..size z)  


"Foo.." is added when more than one type with the given label is
visible in the scope. 

Copy, please, the answer to  mechvel at

With kind regards,

Serge Mechveliani
mechvel at


More information about the Haskell mailing list