Generate better derived code for Eq
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 Feb 2013 08:52:44 +0000 (08:52 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 Feb 2013 08:52:44 +0000 (08:52 +0000)
commit08af5517f9057f999ef6db382b2b9b51aea215c9
tree3bd793dc97470b6cc851bb037391ba38d95e2f5d
parentf525c0b242816abe26c6b5f81b8d677fd595bebd
Generate better derived code for Eq

In particular, when there are only a few nullary constructors generate
regular pattern matching code, rather than using con2Tag.  This avoids
generating unnecessary join points, which can make the code noticably
worse in the few-constructors case.
compiler/typecheck/TcGenDeriv.lhs