summaryrefslogtreecommitdiff
path: root/compiler/hsSyn
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r--compiler/hsSyn/HsBinds.hs21
-rw-r--r--compiler/hsSyn/HsDecls.hs47
-rw-r--r--compiler/hsSyn/HsDoc.hs2
-rw-r--r--compiler/hsSyn/HsExpr.hs34
-rw-r--r--compiler/hsSyn/HsImpExp.hs6
-rw-r--r--compiler/hsSyn/HsLit.hs5
-rw-r--r--compiler/hsSyn/HsPat.hs5
-rw-r--r--compiler/hsSyn/HsSyn.hs1
-rw-r--r--compiler/hsSyn/HsTypes.hs18
-rw-r--r--compiler/hsSyn/PlaceHolder.hs2
10 files changed, 43 insertions, 98 deletions
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs
index ffbd23c459..ce3d3c7d2e 100644
--- a/compiler/hsSyn/HsBinds.hs
+++ b/compiler/hsSyn/HsBinds.hs
@@ -74,7 +74,6 @@ data HsLocalBindsLR idL idR
| HsIPBinds (HsIPBinds idR)
| EmptyLocalBinds
- deriving (Typeable)
deriving instance (DataId idL, DataId idR)
=> Data (HsLocalBindsLR idL idR)
@@ -98,7 +97,6 @@ data HsValBindsLR idL idR
| ValBindsOut
[(RecFlag, LHsBinds idL)]
[LSig Name]
- deriving (Typeable)
deriving instance (DataId idL, DataId idR)
=> Data (HsValBindsLR idL idR)
@@ -227,7 +225,6 @@ data HsBindLR idL idR
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId idL, DataId idR)
=> Data (HsBindLR idL idR)
@@ -249,7 +246,7 @@ data ABExport id
, abe_wrap :: HsWrapper -- ^ See Note [ABExport wrapper]
-- Shape: (forall abs_tvs. abs_ev_vars => abe_mono) ~ abe_poly
, abe_prags :: TcSpecPrags -- ^ SPECIALISE pragmas
- } deriving (Data, Typeable)
+ } deriving Data
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',
-- 'ApiAnnotation.AnnEqual','ApiAnnotation.AnnLarrow'
@@ -263,7 +260,7 @@ data PatSynBind idL idR
psb_args :: HsPatSynDetails (Located idR), -- ^ Formal parameter names
psb_def :: LPat idR, -- ^ Right-hand side
psb_dir :: HsPatSynDir idR -- ^ Directionality
- } deriving (Typeable)
+ }
deriving instance (DataId idL, DataId idR)
=> Data (PatSynBind idL idR)
@@ -620,7 +617,6 @@ data HsIPBinds id
[LIPBind id]
TcEvBinds -- Only in typechecker output; binds
-- uses of the implicit parameters
- deriving (Typeable)
deriving instance (DataId id) => Data (HsIPBinds id)
isEmptyIPBinds :: HsIPBinds id -> Bool
@@ -644,7 +640,6 @@ type LIPBind id = Located (IPBind id)
-- For details on above see note [Api annotations] in ApiAnnotation
data IPBind id
= IPBind (Either (Located HsIPName) id) (LHsExpr id)
- deriving (Typeable)
deriving instance (DataId name) => Data (IPBind name)
instance (OutputableBndr id) => Outputable (HsIPBinds id) where
@@ -794,20 +789,19 @@ data Sig name
| MinimalSig SourceText (LBooleanFormula (Located name))
-- Note [Pragma source text] in BasicTypes
- deriving (Typeable)
deriving instance (DataId name) => Data (Sig name)
type LFixitySig name = Located (FixitySig name)
data FixitySig name = FixitySig [Located name] Fixity
- deriving (Data, Typeable)
+ deriving Data
-- | TsSpecPrags conveys pragmas from the type checker to the desugarer
data TcSpecPrags
= IsDefaultMethod -- ^ Super-specialised: a default method should
-- be macro-expanded at every call site
| SpecPrags [LTcSpecPrag]
- deriving (Data, Typeable)
+ deriving Data
type LTcSpecPrag = Located TcSpecPrag
@@ -818,7 +812,7 @@ data TcSpecPrag
InlinePragma
-- ^ The Id to be specialised, an wrapper that specialises the
-- polymorphic function, and inlining spec for the specialised function
- deriving (Data, Typeable)
+ deriving Data
noSpecPrags :: TcSpecPrags
noSpecPrags = SpecPrags []
@@ -945,7 +939,7 @@ data HsPatSynDetails a
= InfixPatSyn a a
| PrefixPatSyn [a]
| RecordPatSyn [RecordPatSynField a]
- deriving (Typeable, Data)
+ deriving Data
-- See Note [Record PatSyn Fields]
@@ -955,7 +949,7 @@ data RecordPatSynField a
, recordPatSynPatVar :: a
-- Filled in by renamer, the name used internally
-- by the pattern
- } deriving (Typeable, Data)
+ } deriving Data
@@ -1043,5 +1037,4 @@ data HsPatSynDir id
= Unidirectional
| ImplicitBidirectional
| ExplicitBidirectional (MatchGroup id (LHsExpr id))
- deriving (Typeable)
deriving instance (DataId id) => Data (HsPatSynDir id)
diff --git a/compiler/hsSyn/HsDecls.hs b/compiler/hsSyn/HsDecls.hs
index dfcb6c16b7..c6026c484e 100644
--- a/compiler/hsSyn/HsDecls.hs
+++ b/compiler/hsSyn/HsDecls.hs
@@ -142,7 +142,6 @@ data HsDecl id
| SpliceD (SpliceDecl id) -- Includes quasi-quotes
| DocD (DocDecl)
| RoleAnnotD (RoleAnnotDecl id)
- deriving (Typeable)
deriving instance (DataId id) => Data (HsDecl id)
@@ -186,7 +185,7 @@ data HsGroup id
hs_vects :: [LVectDecl id],
hs_docs :: [LDocDecl]
- } deriving (Typeable)
+ }
deriving instance (DataId id) => Data (HsGroup id)
emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup a
@@ -299,14 +298,13 @@ instance OutputableBndr name => Outputable (HsGroup name) where
data SpliceExplicitFlag = ExplicitSplice | -- <=> $(f x y)
ImplicitSplice -- <=> f x y, i.e. a naked top level expression
- deriving (Data, Typeable)
+ deriving Data
type LSpliceDecl name = Located (SpliceDecl name)
data SpliceDecl id
= SpliceDecl -- Top level splice
(Located (HsSplice id))
SpliceExplicitFlag
- deriving (Typeable)
deriving instance (DataId id) => Data (SpliceDecl id)
instance OutputableBndr name => Outputable (SpliceDecl name) where
@@ -522,7 +520,6 @@ data TyClDecl name
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId id) => Data (TyClDecl id)
@@ -749,7 +746,6 @@ data TyClGroup name -- See Note [TyClGroups and dependency analysis]
= TyClGroup { group_tyclds :: [LTyClDecl name]
, group_roles :: [LRoleAnnotDecl name]
, group_instds :: [LInstDecl name] }
- deriving (Typeable)
deriving instance (DataId id) => Data (TyClGroup id)
emptyTyClGroup :: TyClGroup name
@@ -863,7 +859,6 @@ data FamilyResultSig name = -- see Note [FamilyResultSig]
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving ( Typeable )
deriving instance (DataId name) => Data (FamilyResultSig name)
type LFamilyDecl name = Located (FamilyDecl name)
@@ -882,7 +877,6 @@ data FamilyDecl name = FamilyDecl
-- 'ApiAnnotation.AnnVbar'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving ( Typeable )
deriving instance (DataId id) => Data (FamilyDecl id)
@@ -902,7 +896,7 @@ data InjectivityAnn name
-- 'ApiAnnotation.AnnRarrow', 'ApiAnnotation.AnnVbar'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving ( Data, Typeable )
+ deriving Data
data FamilyInfo name
= DataFamily
@@ -910,7 +904,6 @@ data FamilyInfo name
-- | 'Nothing' if we're in an hs-boot file and the user
-- said "type family Foo x where .."
| ClosedTypeFamily (Maybe [LTyFamInstEqn name])
- deriving( Typeable )
deriving instance (DataId name) => Data (FamilyInfo name)
-- | Does this family declaration have a complete, user-supplied kind signature?
@@ -1015,7 +1008,6 @@ data HsDataDefn name -- The payload of a data type defn
-- For details on above see note [Api annotations] in ApiAnnotation
}
- deriving( Typeable )
deriving instance (DataId id) => Data (HsDataDefn id)
type HsDeriving name = Maybe (Located [LHsSigType name])
@@ -1039,7 +1031,7 @@ type HsDeriving name = Maybe (Located [LHsSigType name])
data NewOrData
= NewType -- ^ @newtype Blah ...@
| DataType -- ^ @data Blah ...@
- deriving( Eq, Data, Typeable ) -- Needed because Demand derives Eq
+ deriving( Eq, Data ) -- Needed because Demand derives Eq
type LConDecl name = Located (ConDecl name)
-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when
@@ -1097,7 +1089,7 @@ data ConDecl name
, con_doc :: Maybe LHsDocString
-- ^ A possible Haddock comment.
- } deriving (Typeable)
+ }
deriving instance (DataId name) => Data (ConDecl name)
type HsConDeclDetails name
@@ -1281,7 +1273,6 @@ data TyFamEqn name pats
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving( Typeable )
deriving instance (DataId name, Data pats) => Data (TyFamEqn name pats)
type LTyFamInstDecl name = Located (TyFamInstDecl name)
@@ -1294,7 +1285,6 @@ data TyFamInstDecl name
-- 'ApiAnnotation.AnnInstance',
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving( Typeable )
deriving instance (DataId name) => Data (TyFamInstDecl name)
----------------- Data family instances -------------
@@ -1314,7 +1304,6 @@ data DataFamInstDecl name
-- 'ApiAnnotation.AnnClose'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving( Typeable )
deriving instance (DataId name) => Data (DataFamInstDecl name)
@@ -1342,7 +1331,6 @@ data ClsInstDecl name
-- 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId id) => Data (ClsInstDecl id)
@@ -1356,7 +1344,6 @@ data InstDecl name -- Both class and family instances
{ dfid_inst :: DataFamInstDecl name }
| TyFamInstD -- type family instance
{ tfid_inst :: TyFamInstDecl name }
- deriving (Typeable)
deriving instance (DataId id) => Data (InstDecl id)
instance (OutputableBndr name) => Outputable (TyFamInstDecl name) where
@@ -1471,7 +1458,6 @@ data DerivDecl name = DerivDecl
-- For details on above see note [Api annotations] in ApiAnnotation
}
- deriving (Typeable)
deriving instance (DataId name) => Data (DerivDecl name)
instance (OutputableBndr name) => Outputable (DerivDecl name) where
@@ -1498,7 +1484,6 @@ data DefaultDecl name
-- 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (DefaultDecl name)
instance (OutputableBndr name)
@@ -1541,7 +1526,6 @@ data ForeignDecl name
-- 'ApiAnnotation.AnnDcolon'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (ForeignDecl name)
{-
@@ -1582,7 +1566,7 @@ data ForeignImport = -- import of a C entity
CImportSpec -- details of the C entity
(Located SourceText) -- original source text for
-- the C entity
- deriving (Data, Typeable)
+ deriving Data
-- details of an external C entity
--
@@ -1590,7 +1574,7 @@ data CImportSpec = CLabel CLabelString -- import address of a C label
| CFunction CCallTarget -- static or dynamic function
| CWrapper -- wrapper to expose closures
-- (former f.e.d.)
- deriving (Data, Typeable)
+ deriving Data
-- specification of an externally exported entity in dependence on the calling
-- convention
@@ -1599,7 +1583,7 @@ data ForeignExport = CExport (Located CExportSpec) -- contains the calling
-- convention
(Located SourceText) -- original source text for
-- the C entity
- deriving (Data, Typeable)
+ deriving Data
-- pretty printing of foreign declarations
--
@@ -1649,7 +1633,6 @@ type LRuleDecls name = Located (RuleDecls name)
-- Note [Pragma source text] in BasicTypes
data RuleDecls name = HsRules { rds_src :: SourceText
, rds_rules :: [LRuleDecl name] }
- deriving (Typeable)
deriving instance (DataId name) => Data (RuleDecls name)
type LRuleDecl name = Located (RuleDecl name)
@@ -1674,7 +1657,6 @@ data RuleDecl name
-- 'ApiAnnotation.AnnEqual',
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (RuleDecl name)
flattenRuleDecls :: [LRuleDecls name] -> [LRuleDecl name]
@@ -1689,7 +1671,6 @@ data RuleBndr name
-- 'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (RuleBndr name)
collectRuleBndrSigTys :: [RuleBndr name] -> [LHsSigWcType name]
@@ -1777,7 +1758,6 @@ data VectDecl name
(LHsSigType name)
| HsVectInstOut -- post type-checking (always SCALAR) !!!FIXME: should be superfluous now
ClsInst
- deriving (Typeable)
deriving instance (DataId name) => Data (VectDecl name)
lvectDeclName :: NamedThing name => LVectDecl name -> Name
@@ -1844,7 +1824,7 @@ data DocDecl
| DocCommentPrev HsDocString
| DocCommentNamed String HsDocString
| DocGroup Int HsDocString
- deriving (Data, Typeable)
+ deriving Data
-- Okay, I need to reconstruct the document comments, but for now:
instance Outputable DocDecl where
@@ -1873,13 +1853,13 @@ type LWarnDecls name = Located (WarnDecls name)
data WarnDecls name = Warnings { wd_src :: SourceText
, wd_warnings :: [LWarnDecl name]
}
- deriving (Data, Typeable)
+ deriving Data
type LWarnDecl name = Located (WarnDecl name)
data WarnDecl name = Warning [Located name] WarningTxt
- deriving (Data, Typeable)
+ deriving Data
instance OutputableBndr name => Outputable (WarnDecls name) where
ppr (Warnings _ decls) = ppr decls
@@ -1907,7 +1887,6 @@ data AnnDecl name = HsAnnotation
-- 'ApiAnnotation.AnnClose'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (AnnDecl name)
instance (OutputableBndr name) => Outputable (AnnDecl name) where
@@ -1917,7 +1896,7 @@ instance (OutputableBndr name) => Outputable (AnnDecl name) where
data AnnProvenance name = ValueAnnProvenance (Located name)
| TypeAnnProvenance (Located name)
| ModuleAnnProvenance
- deriving (Data, Typeable, Functor)
+ deriving (Data, Functor)
deriving instance Foldable AnnProvenance
deriving instance Traversable AnnProvenance
@@ -1952,7 +1931,7 @@ data RoleAnnotDecl name
-- 'ApiAnnotation.AnnRole'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Data, Typeable)
+ deriving Data
instance OutputableBndr name => Outputable (RoleAnnotDecl name) where
ppr (RoleAnnotDecl ltycon roles)
diff --git a/compiler/hsSyn/HsDoc.hs b/compiler/hsSyn/HsDoc.hs
index 72bf0e56a4..e5159363d7 100644
--- a/compiler/hsSyn/HsDoc.hs
+++ b/compiler/hsSyn/HsDoc.hs
@@ -15,7 +15,7 @@ import FastString
import Data.Data
newtype HsDocString = HsDocString FastString
- deriving (Eq, Show, Data, Typeable)
+ deriving (Eq, Show, Data)
type LHsDocString = Located HsDocString
diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs
index a6aaa6cecd..0937d29f65 100644
--- a/compiler/hsSyn/HsExpr.hs
+++ b/compiler/hsSyn/HsExpr.hs
@@ -95,7 +95,6 @@ noPostTcTable = []
data SyntaxExpr id = SyntaxExpr { syn_expr :: HsExpr id
, syn_arg_wraps :: [HsWrapper]
, syn_res_wrap :: HsWrapper }
- deriving (Typeable)
deriving instance (DataId id) => Data (SyntaxExpr id)
-- | This is used for rebindable-syntax pieces that are too polymorphic
@@ -179,7 +178,7 @@ data UnboundVar
| TrueExprHole OccName -- ^ A "true" expression hole (_ or _x)
- deriving (Data, Typeable)
+ deriving Data
instance Outputable UnboundVar where
ppr = ppr . unboundVarOcc
@@ -658,7 +657,6 @@ data HsExpr id
| HsWrap HsWrapper -- TRANSLATION
(HsExpr id)
- deriving (Typeable)
deriving instance (DataId id) => Data (HsExpr id)
-- | HsTupArg is used for tuple sections
@@ -671,7 +669,6 @@ type LHsTupArg id = Located (HsTupArg id)
data HsTupArg id
= Present (LHsExpr id) -- ^ The argument
| Missing (PostTc id Type) -- ^ The argument is missing, but this is its type
- deriving (Typeable)
deriving instance (DataId id) => Data (HsTupArg id)
tupArgPresent :: LHsTupArg id -> Bool
@@ -1143,11 +1140,10 @@ data HsCmd id
(HsCmd id) -- If cmd :: arg1 --> res
-- wrap :: arg1 "->" arg2
-- Then (HsCmdWrap wrap cmd) :: arg2 --> res
- deriving (Typeable)
deriving instance (DataId id) => Data (HsCmd id)
data HsArrAppType = HsHigherOrderApp | HsFirstOrderApp
- deriving (Data, Typeable)
+ deriving Data
{- | Top-level command, introducing a new arrow.
@@ -1162,7 +1158,6 @@ data HsCmdTop id
(PostTc id Type) -- Nested tuple of inputs on the command's stack
(PostTc id Type) -- return type of the command
(CmdSyntaxTable id) -- See Note [CmdSyntaxTable]
- deriving (Typeable)
deriving instance (DataId id) => Data (HsCmdTop id)
instance OutputableBndr id => Outputable (HsCmd id) where
@@ -1291,7 +1286,6 @@ data MatchGroup id body
-- The type is the type of the entire group
-- t1 -> ... -> tn -> tr
-- where there are n patterns
- deriving (Typeable)
deriving instance (Data body,DataId id) => Data (MatchGroup id body)
type LMatch id body = Located (Match id body)
@@ -1309,7 +1303,7 @@ data Match id body
-- Nothing after typechecking
-- NB: No longer supported
m_grhss :: (GRHSs id body)
- } deriving (Typeable)
+ }
deriving instance (Data body,DataId id) => Data (Match id body)
{-
@@ -1344,7 +1338,6 @@ data MatchFixity id
= NonFunBindMatch
| FunBindMatch (Located id) -- of the Id
Bool -- is infix
- deriving (Typeable)
deriving instance (DataId id) => Data (MatchFixity id)
isInfixMatch :: Match id body -> Bool
@@ -1386,7 +1379,7 @@ data GRHSs id body
= GRHSs {
grhssGRHSs :: [LGRHS id body], -- ^ Guarded RHSs
grhssLocalBinds :: Located (HsLocalBinds id) -- ^ The where clause
- } deriving (Typeable)
+ }
deriving instance (Data body,DataId id) => Data (GRHSs id body)
type LGRHS id body = Located (GRHS id body)
@@ -1394,7 +1387,6 @@ type LGRHS id body = Located (GRHS id body)
-- | Guarded Right Hand Side.
data GRHS id body = GRHS [GuardLStmt id] -- Guards
body -- Right hand side
- deriving (Typeable)
deriving instance (Data body,DataId id) => Data (GRHS id body)
-- We know the list must have at least one @Match@ in it.
@@ -1623,21 +1615,19 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
-- With rebindable syntax the type might not
-- be quite as simple as (m (tya, tyb, tyc)).
}
- deriving (Typeable)
deriving instance (Data body, DataId idL, DataId idR)
=> Data (StmtLR idL idR body)
data TransForm -- The 'f' below is the 'using' function, 'e' is the by function
= ThenForm -- then f or then f by e (depending on trS_by)
| GroupForm -- then group using f or then group by e using f (depending on trS_by)
- deriving (Data, Typeable)
+ deriving Data
data ParStmtBlock idL idR
= ParStmtBlock
[ExprLStmt idL]
[idR] -- The variables to be returned
(SyntaxExpr idR) -- The return operator
- deriving( Typeable )
deriving instance (DataId idL, DataId idR) => Data (ParStmtBlock idL idR)
data ApplicativeArg idL idR
@@ -1648,7 +1638,6 @@ data ApplicativeArg idL idR
[ExprLStmt idL] -- stmts
(HsExpr idL) -- return (v1,..,vn), or just (v1,..,vn)
(LPat idL) -- (v1,...,vn)
- deriving( Typeable )
deriving instance (DataId idL, DataId idR) => Data (ApplicativeArg idL idR)
{-
@@ -1930,7 +1919,6 @@ data HsSplice id
id -- Quoter
SrcSpan -- The span of the enclosed string
FastString -- The enclosed string
- deriving (Typeable )
deriving instance (DataId id) => Data (HsSplice id)
@@ -1943,18 +1931,18 @@ type SplicePointName = Name
data PendingRnSplice
= PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr Name)
- deriving (Data, Typeable)
+ deriving Data
data UntypedSpliceFlavour
= UntypedExpSplice
| UntypedPatSplice
| UntypedTypeSplice
| UntypedDeclSplice
- deriving( Data, Typeable )
+ deriving Data
data PendingTcSplice
= PendingTcSplice SplicePointName (LHsExpr Id)
- deriving( Data, Typeable )
+ deriving Data
{-
@@ -2058,7 +2046,6 @@ data HsBracket id = ExpBr (LHsExpr id) -- [| expr |]
| VarBr Bool id -- True: 'x, False: ''T
-- (The Bool flag is used only in pprHsBracket)
| TExpBr (LHsExpr id) -- [|| expr ||]
- deriving (Typeable)
deriving instance (DataId id) => Data (HsBracket id)
isTypedBracket :: HsBracket id -> Bool
@@ -2109,7 +2096,6 @@ data ArithSeqInfo id
| FromThenTo (LHsExpr id)
(LHsExpr id)
(LHsExpr id)
- deriving (Typeable)
deriving instance (DataId id) => Data (ArithSeqInfo id)
instance OutputableBndr id => Outputable (ArithSeqInfo id) where
@@ -2148,7 +2134,7 @@ data HsMatchContext id -- Context of a Match
| ThPatSplice -- A Template Haskell pattern splice
| ThPatQuote -- A Template Haskell pattern quotation [p| (a,b) |]
| PatSyn -- A pattern synonym declaration
- deriving (Data, Typeable)
+ deriving Data
data HsStmtContext id
= ListComp
@@ -2163,7 +2149,7 @@ data HsStmtContext id
| PatGuard (HsMatchContext id) -- Pattern guard for specified thing
| ParStmtCtxt (HsStmtContext id) -- A branch of a parallel stmt
| TransStmtCtxt (HsStmtContext id) -- A branch of a transform stmt
- deriving (Data, Typeable)
+ deriving Data
isListCompExpr :: HsStmtContext id -> Bool
-- Uses syntax [ e | quals ]
diff --git a/compiler/hsSyn/HsImpExp.hs b/compiler/hsSyn/HsImpExp.hs
index 4c72b35699..beecd60398 100644
--- a/compiler/hsSyn/HsImpExp.hs
+++ b/compiler/hsSyn/HsImpExp.hs
@@ -70,7 +70,7 @@ data ImportDecl name
-- to location in ideclHiding
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Data, Typeable)
+ deriving Data
simpleImportDecl :: ModuleName -> ImportDecl name
simpleImportDecl mn = ImportDecl {
@@ -177,9 +177,9 @@ data IE name
| IEGroup Int HsDocString -- ^ Doc section heading
| IEDoc HsDocString -- ^ Some documentation
| IEDocNamed String -- ^ Reference to named doc
- deriving (Eq, Data, Typeable)
+ deriving (Eq, Data)
-data IEWildcard = NoIEWildcard | IEWildcard Int deriving (Eq, Data, Typeable)
+data IEWildcard = NoIEWildcard | IEWildcard Int deriving (Eq, Data)
{-
Note [IEThingWith]
diff --git a/compiler/hsSyn/HsLit.hs b/compiler/hsSyn/HsLit.hs
index 4686077d27..4fa0a64afd 100644
--- a/compiler/hsSyn/HsLit.hs
+++ b/compiler/hsSyn/HsLit.hs
@@ -57,7 +57,7 @@ data HsLit
-- done with HsOverLit)
| HsFloatPrim FractionalLit -- Unboxed Float
| HsDoublePrim FractionalLit -- Unboxed Double
- deriving (Data, Typeable)
+ deriving Data
instance Eq HsLit where
(HsChar _ x1) == (HsChar _ x2) = x1==x2
@@ -81,7 +81,6 @@ data HsOverLit id -- An overloaded literal
ol_rebindable :: PostRn id Bool, -- Note [ol_rebindable]
ol_witness :: HsExpr id, -- Note [Overloaded literal witnesses]
ol_type :: PostTc id Type }
- deriving (Typeable)
deriving instance (DataId id) => Data (HsOverLit id)
-- Note [Literal source text] in BasicTypes for SourceText fields in
@@ -90,7 +89,7 @@ data OverLitVal
= HsIntegral !SourceText !Integer -- Integer-looking literals;
| HsFractional !FractionalLit -- Frac-looking literals
| HsIsString !SourceText !FastString -- String-looking literals
- deriving (Data, Typeable)
+ deriving Data
overLitType :: HsOverLit a -> PostTc a Type
overLitType = ol_type
diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs
index e01c6b9d07..c168def337 100644
--- a/compiler/hsSyn/HsPat.hs
+++ b/compiler/hsSyn/HsPat.hs
@@ -228,7 +228,6 @@ data Pat id
Type -- Type of whole pattern, t1
-- During desugaring a (CoPat co pat) turns into a cast with 'co' on
-- the scrutinee, followed by a match on 'pat'
- deriving (Typeable)
deriving instance (DataId id) => Data (Pat id)
type HsConPatDetails id = HsConDetails (LPat id) (HsRecFields id (LPat id))
@@ -246,7 +245,7 @@ data HsRecFields id arg -- A bunch of record fields
-- Used for both expressions and patterns
= HsRecFields { rec_flds :: [LHsRecField id arg],
rec_dotdot :: Maybe Int } -- Note [DotDot fields]
- deriving (Typeable, Functor, Foldable, Traversable)
+ deriving (Functor, Foldable, Traversable)
deriving instance (DataId id, Data arg) => Data (HsRecFields id arg)
@@ -278,7 +277,7 @@ data HsRecField' id arg = HsRecField {
hsRecFieldLbl :: Located id,
hsRecFieldArg :: arg, -- ^ Filled in by renamer when punning
hsRecPun :: Bool -- ^ Note [Punning]
- } deriving (Data, Typeable, Functor, Foldable, Traversable)
+ } deriving (Data, Functor, Foldable, Traversable)
-- Note [Punning]
diff --git a/compiler/hsSyn/HsSyn.hs b/compiler/hsSyn/HsSyn.hs
index c226dfecf9..76d31a4182 100644
--- a/compiler/hsSyn/HsSyn.hs
+++ b/compiler/hsSyn/HsSyn.hs
@@ -105,7 +105,6 @@ data HsModule name
-- hsmodImports,hsmodDecls if this style is used.
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (HsModule name)
instance (OutputableBndr name, HasOccName name)
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs
index bc78a7d270..66145b6588 100644
--- a/compiler/hsSyn/HsTypes.hs
+++ b/compiler/hsSyn/HsTypes.hs
@@ -251,7 +251,6 @@ data LHsQTyVars name -- See Note [HsType binders]
-- which explicit vars are dependent
-- See Note [Dependent LHsQTyVars] in TcHsType
}
- deriving( Typeable )
deriving instance (DataId name) => Data (LHsQTyVars name)
@@ -282,7 +281,6 @@ data HsImplicitBndrs name thing -- See Note [HsType binders]
= HsIB { hsib_vars :: PostRn name [Name] -- Implicitly-bound kind & type vars
, hsib_body :: thing -- Main payload (type or list of types)
}
- deriving (Typeable)
data HsWildCardBndrs name thing
-- See Note [HsType binders]
@@ -300,7 +298,6 @@ data HsWildCardBndrs name thing
, hswc_body :: thing -- Main payload (type or list of types)
}
- deriving( Typeable )
deriving instance (Data name, Data thing, Data (PostRn name [Name]))
=> Data (HsImplicitBndrs name thing)
@@ -372,7 +369,7 @@ mkEmptyWildCardBndrs x = HsWC { hswc_body = x
-- | These names are used early on to store the names of implicit
-- parameters. They completely disappear after type-checking.
newtype HsIPName = HsIPName FastString
- deriving( Eq, Data, Typeable )
+ deriving( Eq, Data )
hsIPNameFS :: HsIPName -> FastString
hsIPNameFS (HsIPName n) = n
@@ -398,7 +395,6 @@ data HsTyVarBndr name
-- 'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnClose'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (HsTyVarBndr name)
-- | Does this 'HsTyVarBndr' come with an explicit kind annotation?
@@ -565,7 +561,6 @@ data HsType name
-- ^ - 'ApiAnnotation.AnnKeywordId' : None
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (HsType name)
-- Note [Literal source text] in BasicTypes for SourceText fields in
@@ -573,13 +568,12 @@ deriving instance (DataId name) => Data (HsType name)
data HsTyLit
= HsNumTy SourceText Integer
| HsStrTy SourceText FastString
- deriving (Data, Typeable)
+ deriving Data
newtype HsWildCardInfo name -- See Note [The wildcard story for types]
= AnonWildCard (PostRn name (Located Name))
-- A anonymous wild card ('_'). A fresh Name is generated for
-- each individual anonymous wildcard during renaming
- deriving (Typeable)
deriving instance (DataId name) => Data (HsWildCardInfo name)
type LHsAppType name = Located (HsAppType name)
@@ -588,7 +582,6 @@ type LHsAppType name = Located (HsAppType name)
data HsAppType name
= HsAppInfix (Located name) -- either a symbol or an id in backticks
| HsAppPrefix (LHsType name) -- anything else, including things like (+)
- deriving (Typeable)
deriving instance (DataId name) => Data (HsAppType name)
instance OutputableBndr name => Outputable (HsAppType name) where
@@ -705,7 +698,7 @@ data HsTupleSort = HsUnboxedTuple
| HsBoxedTuple
| HsConstraintTuple
| HsBoxedOrConstraintTuple
- deriving (Data, Typeable)
+ deriving Data
type LConDeclField name = Located (ConDeclField name)
-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when
@@ -720,7 +713,6 @@ data ConDeclField name -- Record fields have Haddoc docs on them
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'
-- For details on above see note [Api annotations] in ApiAnnotation
- deriving (Typeable)
deriving instance (DataId name) => Data (ConDeclField name)
instance (OutputableBndr name) => Outputable (ConDeclField name) where
@@ -732,7 +724,7 @@ data HsConDetails arg rec
= PrefixCon [arg] -- C p1 p2 p3
| RecCon rec -- C { x = p1, y = p2 }
| InfixCon arg arg -- p1 `C` p2
- deriving (Data, Typeable)
+ deriving Data
instance (Outputable arg, Outputable rec)
=> Outputable (HsConDetails arg rec) where
@@ -1050,7 +1042,6 @@ data FieldOcc name = FieldOcc { rdrNameFieldOcc :: Located RdrName
-- ^ See Note [Located RdrNames] in HsExpr
, selectorFieldOcc :: PostRn name name
}
- deriving Typeable
deriving instance Eq (PostRn name name) => Eq (FieldOcc name)
deriving instance Ord (PostRn name name) => Ord (FieldOcc name)
deriving instance (Data name, Data (PostRn name name)) => Data (FieldOcc name)
@@ -1075,7 +1066,6 @@ mkFieldOcc rdr = FieldOcc rdr PlaceHolder
data AmbiguousFieldOcc name
= Unambiguous (Located RdrName) (PostRn name name)
| Ambiguous (Located RdrName) (PostTc name name)
- deriving (Typeable)
deriving instance ( Data name
, Data (PostRn name name)
, Data (PostTc name name))
diff --git a/compiler/hsSyn/PlaceHolder.hs b/compiler/hsSyn/PlaceHolder.hs
index b4e109f045..cacad7111c 100644
--- a/compiler/hsSyn/PlaceHolder.hs
+++ b/compiler/hsSyn/PlaceHolder.hs
@@ -35,7 +35,7 @@ import BasicTypes (Fixity)
-- | used as place holder in PostTc and PostRn values
data PlaceHolder = PlaceHolder
- deriving (Data,Typeable)
+ deriving (Data)
-- | Types that are not defined until after type checking
type family PostTc id ty -- Note [Pass sensitive types]