> 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
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime