ghc-7.0.3: The GHC API

InstEnv

# Documentation

type DFunId = Id Source

data OverlapFlag Source

Constructors

NoOverlap |
OverlapOk |
Incoherent |

Instances

Eq OverlapFlag |
Outputable OverlapFlag |
Binary OverlapFlag |

data Instance Source

Constructors

Instance |

Fields

is_cls :: Name
is_tcs :: [Maybe Name]
is_tvs :: TyVarSet
is_tys :: [Type]
is_dfun :: DFunId
is_flag :: OverlapFlag

Instances

Outputable Instance |
NamedThing Instance |

pprInstance :: Instance -> SDoc Source

pprInstanceHdr :: Instance -> SDoc Source

pprInstances :: [Instance] -> SDoc Source

instanceHead :: Instance -> ([TyVar], ThetaType, Class, [Type])Source

mkLocalInstance :: DFunId -> OverlapFlag -> Instance Source

mkImportedInstance :: Name -> [Maybe Name] -> DFunId -> OverlapFlag -> Instance Source

instanceDFunId :: Instance -> DFunId Source

setInstanceDFunId :: Instance -> DFunId -> Instance Source

instanceRoughTcs :: Instance -> [Maybe Name]Source

type InstEnv = UniqFM ClsInstEnvSource

emptyInstEnv :: InstEnv Source

extendInstEnv :: InstEnv -> Instance -> InstEnv Source

extendInstEnvList :: InstEnv -> [Instance] -> InstEnv Source

lookupInstEnv :: (InstEnv, InstEnv) -> Class -> [Type] -> ([InstMatch], [Instance])Source

instEnvElts :: InstEnv -> [Instance]Source

classInstances :: (InstEnv, InstEnv) -> Class -> [Instance]Source

instanceBindFun :: TyVar -> BindFlag Source

instanceCantMatch :: [Maybe Name] -> [Maybe Name] -> Bool Source

roughMatchTcs :: [Type] -> [Maybe Name]Source