
24 Jan
2007
24 Jan
'07
6:27 a.m.
Hallo,
On 1/24/07, jamin1001
So then how should this be done? What if I want to do something like
data Chair = Chair {pos:: Int, color :: Int} data Table = Table {pos:: Int, color :: Int}
data Chair = Chair { chairPos :: Int, chairColor :: Int }
Also, could someone tell me why this doesn't compile in GHC:
data Test = A {a::Int} | B {a::Int, b::Int} data Test2 = C {c::A}
'A' is not a type, is a constructor for type 'Test'. -- -alex http://www.ventonegro.org/