1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface TcDeriv where
5 import CmdLineOpts(GlobalSwitch)
7 import HsDecls(FixityDecl)
11 import PreludePS(_PackedString)
12 import Pretty(PprStyle, PrettyRep)
13 import ProtoName(ProtoName)
14 import SplitUniq(SplitUniqSupply)
17 import TcInstDcls(InstInfo)
18 import TcMonad(TcResult)
21 import UniType(UniType)
23 type DerivEqn = (Class, TyCon, [TyVar], [(Class, UniType)])
24 data TagThingWanted = GenCon2Tag | GenTag2Con | GenMaxTag
25 con2tag_PN :: TyCon -> ProtoName
26 maxtag_PN :: TyCon -> ProtoName
27 tag2con_PN :: TyCon -> ProtoName
28 tcDeriving :: _PackedString -> (ProtoName -> Labda Name, ProtoName -> Labda Name) -> Bag InstInfo -> UniqFM TyCon -> [FixityDecl Name] -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> TcResult (Bag InstInfo, Binds Name (InPat Name), PprStyle -> Int -> Bool -> PrettyRep)