Safe Haskell | None |
---|
- data FamInst = FamInst {}
- data FamFlavor
- famInstAxiom :: FamInst -> CoAxiom Unbranched
- famInstTyCon :: FamInst -> TyCon
- famInstRHS :: FamInst -> Type
- famInstsRepTyCons :: [FamInst] -> [TyCon]
- famInstRepTyCon_maybe :: FamInst -> Maybe TyCon
- dataFamInstRepTyCon :: FamInst -> TyCon
- pprFamInst :: FamInst -> SDoc
- pprFamInstHdr :: FamInst -> SDoc
- pprFamInsts :: [FamInst] -> SDoc
- mkImportedFamInst :: Name -> [Maybe Name] -> CoAxiom Unbranched -> FamInst
- type FamInstEnvs = (FamInstEnv, FamInstEnv)
- type FamInstEnv = UniqFM FamilyInstEnv
- emptyFamInstEnv :: FamInstEnv
- emptyFamInstEnvs :: (FamInstEnv, FamInstEnv)
- extendFamInstEnv :: FamInstEnv -> FamInst -> FamInstEnv
- deleteFromFamInstEnv :: FamInstEnv -> FamInst -> FamInstEnv
- extendFamInstEnvList :: FamInstEnv -> [FamInst] -> FamInstEnv
- identicalFamInst :: FamInst -> FamInst -> Bool
- famInstEnvElts :: FamInstEnv -> [FamInst]
- familyInstances :: (FamInstEnv, FamInstEnv) -> TyCon -> [FamInst]
- orphNamesOfFamInst :: FamInst -> NameSet
- mkCoAxBranch :: [TyVar] -> [Type] -> Type -> SrcSpan -> CoAxBranch
- mkBranchedCoAxiom :: Name -> TyCon -> [CoAxBranch] -> CoAxiom Branched
- mkUnbranchedCoAxiom :: Name -> TyCon -> CoAxBranch -> CoAxiom Unbranched
- mkSingleCoAxiom :: Name -> [TyVar] -> TyCon -> [Type] -> Type -> CoAxiom Unbranched
- computeAxiomIncomps :: CoAxiom br -> CoAxiom br
- data FamInstMatch = FamInstMatch {
- fim_instance :: FamInst
- fim_tys :: [Type]
- lookupFamInstEnv :: FamInstEnvs -> TyCon -> [Type] -> [FamInstMatch]
- lookupFamInstEnvConflicts :: FamInstEnvs -> FamInst -> [FamInstMatch]
- isDominatedBy :: CoAxBranch -> [CoAxBranch] -> Bool
- chooseBranch :: CoAxiom Branched -> [Type] -> Maybe (BranchIndex, [Type])
- topNormaliseType :: FamInstEnvs -> Type -> Maybe (Coercion, Type)
- normaliseType :: FamInstEnvs -> Role -> Type -> (Coercion, Type)
- normaliseTcApp :: FamInstEnvs -> Role -> TyCon -> [Type] -> (Coercion, Type)
- flattenTys :: InScopeSet -> [Type] -> [Type]
Documentation
famInstTyCon :: FamInst -> TyConSource
famInstRHS :: FamInst -> TypeSource
famInstsRepTyCons :: [FamInst] -> [TyCon]Source
pprFamInst :: FamInst -> SDocSource
pprFamInstHdr :: FamInst -> SDocSource
pprFamInsts :: [FamInst] -> SDocSource
mkImportedFamInst :: Name -> [Maybe Name] -> CoAxiom Unbranched -> FamInstSource
type FamInstEnvs = (FamInstEnv, FamInstEnv)Source
type FamInstEnv = UniqFM FamilyInstEnvSource
extendFamInstEnvList :: FamInstEnv -> [FamInst] -> FamInstEnvSource
identicalFamInst :: FamInst -> FamInst -> BoolSource
famInstEnvElts :: FamInstEnv -> [FamInst]Source
familyInstances :: (FamInstEnv, FamInstEnv) -> TyCon -> [FamInst]Source
orphNamesOfFamInst :: FamInst -> NameSetSource
Collects the names of the concrete types and type constructors that make up the LHS of a type family instance. For instance, given `type family Foo a b`:
`type instance Foo (F (G (H a))) b = ...` would yield [F,G,H]
Used in the implementation of :info in GHCi.
CoAxioms
mkCoAxBranch :: [TyVar] -> [Type] -> Type -> SrcSpan -> CoAxBranchSource
mkBranchedCoAxiom :: Name -> TyCon -> [CoAxBranch] -> CoAxiom BranchedSource
mkUnbranchedCoAxiom :: Name -> TyCon -> CoAxBranch -> CoAxiom UnbranchedSource
mkSingleCoAxiom :: Name -> [TyVar] -> TyCon -> [Type] -> Type -> CoAxiom UnbranchedSource
computeAxiomIncomps :: CoAxiom br -> CoAxiom brSource
data FamInstMatch Source
FamInstMatch | |
|
lookupFamInstEnv :: FamInstEnvs -> TyCon -> [Type] -> [FamInstMatch]Source
isDominatedBy :: CoAxBranch -> [CoAxBranch] -> BoolSource
chooseBranch :: CoAxiom Branched -> [Type] -> Maybe (BranchIndex, [Type])Source
topNormaliseType :: FamInstEnvs -> Type -> Maybe (Coercion, Type)Source
normaliseType :: FamInstEnvs -> Role -> Type -> (Coercion, Type)Source
normaliseTcApp :: FamInstEnvs -> Role -> TyCon -> [Type] -> (Coercion, Type)Source
flattenTys :: InScopeSet -> [Type] -> [Type]Source