[Haskell-cafe] basic field questions

Alex Queiroz asandroq at gmail.com
Wed Jan 24 06:39:03 EST 2007


Hallo,

On 1/24/07, Ketil Malde <Ketil.Malde at bccs.uib.no> wrote:
> jamin1001 wrote:
> > What if I want to do something like
> >
> > data Chair = Chair {pos:: Int, color :: Int}
> > data Table = Table {pos:: Int, color :: Int}
> >
> data Properties = Props { pos, color :: Int }
> data Chair = Chair Props
> data Table = Table Props
>

     Do you mean:

data Chair = Chair Properties
data Table = Table Properties

?

-- 
-alex
http://www.ventonegro.org/


More information about the Haskell-Cafe mailing list