On Mon, May 2, 2011 at 6:20 PM, C Rodrigues <red...@hotmail.com> wrote: > I was experimenting with using GADTs for subtyping when I found something > interesting. Hopefully someone can satisfy my curiosity. > Here are two equivalent GADTs. My understanding was that GHC would > translate "Foo" and "Bar" into isomorphic data types. However, GHC 6.12.3 > generates better code for 'fooName' than for 'barName'. In 'fooName', there > is no pattern match against 'FooExtra'. In 'barName', there is a pattern > match against 'BarExtra'. What makes these data types different?
IIRC, GHC 6.12.3 had some problems with type equalities. Did you try GHC 7.0.3? Cheers, =) -- Felipe. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users