id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
1954,"Incorrect ""Defined but not used"" warning when using GeneralizedNewtypeDeriving",magnus,igloo,"When compiling
{{{
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -Wall -Werror #-}
module Bug(P, runP) where

import Control.Monad.Identity(Identity, runIdentity)

newtype P a = P { unP :: Identity a } deriving Monad

runP :: P a -> a
runP = runIdentity . unP
}}}
I get 
{{{
Bug.hs:7:14: Warning: Defined but not used: data constructor `P'
}}}
although the constructor is used in the derived Monad instance.  This is obviously not a show stopper, but it forces me to rewrite what to me looks like an OK program if I want to stick to the given OPTIONS_GHC.
",merge,closed,normal,6.12 branch,Compiler,6.8.1,fixed,,ndmitchell@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,rename/should_compile/T1954,,,
