Opened 11 years ago

Closed 11 years ago

#2433 closed merge (fixed)

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

Reported by: claus Owned by:
Priority: normal Milestone: 6.8 branch
Component: Compiler Version: 6.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: typecheck/should_compile/T2433
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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?

Change History (6)

comment:1 Changed 11 years ago by igloo

difficulty: Unknown
Milestone: 6.10.1

comment:2 Changed 11 years ago by simonpj

Owner: set to igloo
Test Case: typecheck/should_compile/T2433
Type: bugmerge

Good point. Fixed by

Mon Aug  4 15:15:03 BST 2008  simonpj@microsoft.com
  * Fix Trac #2433 (deriving Typeable)

Simon

comment:3 Changed 11 years ago by igloo

Milestone: 6.10.16.8 branch
Owner: igloo deleted

comment:4 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:6 Changed 11 years ago by igloo

Resolution: fixed
Status: newclosed

We won't be releasing 6.8.4.

Note: See TracTickets for help on using tickets.