#1954: Incorrect "Defined but not used" warning when using
GeneralizedNewtypeDeriving
---------------------------------+------------------------------------------
Reporter: magnus | Owner: igloo
Type: merge | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler | Version: 6.8.1
Keywords: | Difficulty: Unknown
Os: Unknown/Multiple | Testcase: rename/should_compile/T1954
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by simonpj):
* owner: => igloo
* testcase: => rename/should_compile/T1954
* type: bug => merge
Comment:
Thanks for the reminder. It was pretty easy to fix
{{{
Tue Mar 9 09:35:55 PST 2010 [email protected]
* 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
M ./compiler/typecheck/TcDeriv.lhs -3 +25
M ./compiler/typecheck/TcEnv.lhs -8 +15
M ./compiler/typecheck/TcInstDcls.lhs -1 +1
}}}
Could be merged to 6.12, but not if it causes any trouble.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1954#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs