import CoreSyn
-import TyCon ( TyCon )
import Class ( Class )
import PrimOp ( PrimOp )
import Var ( Id )
data GlobalIdDetails
= VanillaGlobal -- Imported from elsewhere, a default method Id.
- | GenericOpId TyCon -- The to/from operations of a
| RecordSelId FieldLabel -- The Id for a record selector
| DataConWorkId DataCon -- The Id for a data constructor *worker*
| DataConWrapId DataCon -- The Id for a data constructor *wrapper*
instance Outputable GlobalIdDetails where
ppr NotGlobalId = ptext SLIT("[***NotGlobalId***]")
ppr VanillaGlobal = ptext SLIT("[GlobalId]")
- ppr (GenericOpId _) = ptext SLIT("[GenericOp]")
ppr (DataConWorkId _) = ptext SLIT("[DataCon]")
ppr (DataConWrapId _) = ptext SLIT("[DataConWrapper]")
ppr (ClassOpId _) = ptext SLIT("[ClassOp]")
data WorkerInfo = NoWorker
| HasWorker Id Arity
-- The Arity is the arity of the *wrapper* at the moment of the
- -- w/w split. See comments in MkIface.ifaceId, with the 'Worker' code.
+ -- w/w split. See notes above.
seqWorker :: WorkerInfo -> ()
seqWorker (HasWorker id a) = id `seq` a `seq` ()