Fix Trac #1954: newtype deriving caused 'defined but not used' error
authorsimonpj@microsoft.com <unknown>
Tue, 9 Mar 2010 17:35:55 +0000 (17:35 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 9 Mar 2010 17:35:55 +0000 (17:35 +0000)
commitb7a8d2059f982599d31d14395c6628a049ec5179
tree2328a5a5d25712dcff4b17d463da7eb2bcc2621e
parent435c5194b6047510d20a3d0c459c9b49e18da154
Fix Trac #1954: newtype deriving caused 'defined but not used' error

We were getting a bogus claim that a newtype "data constructor" was
unused.  The fix is easy, although I had to add a field to the constructor
TcEnv.NewTypeDerived

See Note [Newtype deriving and unused constructors] in TcDeriv
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcEnv.lhs
compiler/typecheck/TcInstDcls.lhs