
14 Oct
2013
14 Oct
'13
9:01 p.m.
It is still impossible write
type Person = (lastName::Sting, name :: String) type Image = ( name :: ByteString, sizeX :: Int, sizeY :: Int )
name :: (b ~ Stirng) => (a,b) -> b name :: (a ~ ByteString) => (a,b,c) -> a
I think, you misunderstood the primary part: in this proposal record fields are accessed not with functions, but more like fields in OO languages. So the problem of function sharing does not exist as such. E.g.: namesOfPersonAndImage :: Person -> Image -> String namesOfPersonAndImage person image = person.name ++ ", " ++ show image.name