On 10 November 2010 10:56, Ozgur Akgun <ozgurak...@gmail.com> wrote: > 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 -> String > getName (Left f) = name f > getName (Right b) = name b > > However, currently you cannot: "Multiple declarations of 'name'" >
Oh by the way, TDNR doesn't only work for record names, yet its use for record names is an important motivation. This was just an example. I don't want to cause any confusion while trying simplify things. -- Ozgur Akgun
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe