Skip to content

standalone deriving Typeable shouldn't need data constructors in scope?

customary artificial example:

{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}

import Data.Typeable(Typeable1)
import qualified Prelude()
import Prelude(Maybe)

deriving instance Typeable1 Maybe

GHCi, version 6.9.20080709:

DTR.hs:8:0:
    The data constructors of `Maybe' are not all in scope
      so you cannot derive an instance for it
    In the stand-alone deriving instance for `Typeable1 Maybe'
Failed, modules loaded: none.

Does Typeable really need access to the data constructors?

Trac metadata
Trac field Value
Version 6.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information