Using TDNR, it will be possible to write the following code:
data Foo = Foo { name :: String }data Bar = Bar { name :: String }getName :: Either Foo Bar -> StringgetName (Left f) = name fgetName (Right b) = name bHowever, currently you cannot: "Multiple declarations of 'name'"