TcEvidence

ghc-7.8.3: The GHC API

Safe Haskell | None
Language | Haskell98

TcEvidence

# Documentation

data HsWrapper Source

Constructors

WpHole |
WpCompose HsWrapper HsWrapper |
WpCast TcCoercion |
WpEvLam EvVar |
WpEvApp EvTerm |
WpTyLam TyVar |
WpTyApp KindOrType |
WpLet TcEvBinds |

Instances

Data HsWrapper |
Outputable HsWrapper |
Typeable * HsWrapper |

(<.>) :: HsWrapper -> HsWrapper -> HsWrapper Source

mkWpTyApps :: [Type] -> HsWrapper Source

mkWpEvApps :: [EvTerm] -> HsWrapper Source

mkWpEvVarApps :: [EvVar] -> HsWrapper Source

mkWpTyLams :: [TyVar] -> HsWrapper Source

mkWpLams :: [Var] -> HsWrapper Source

mkWpLet :: TcEvBinds -> HsWrapper Source

mkWpCast :: TcCoercion -> HsWrapper Source

idHsWrapper :: HsWrapper Source

isIdHsWrapper :: HsWrapper -> Bool Source

pprHsWrapper :: SDoc -> HsWrapper -> SDoc Source

data TcEvBinds Source

Constructors

TcEvBinds EvBindsVar |
EvBinds (Bag EvBind) |

Instances

Data TcEvBinds |
Outputable TcEvBinds |
Typeable * TcEvBinds |

data EvBindsVar Source

Constructors

EvBindsVar (IORef EvBindMap) Unique |

Instances

Outputable EvBindsVar |

newtype EvBindMap Source

Constructors

EvBindMap |
Fields ev_bind_varenv :: VarEnv EvBind

emptyEvBindMap :: EvBindMap Source

extendEvBinds :: EvBindMap -> EvVar -> EvTerm -> EvBindMap Source

lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind Source

evBindMapBinds :: EvBindMap -> Bag EvBind Source

data EvBind Source

Constructors

EvBind EvVar EvTerm |

Instances

Outputable EvBind |

emptyTcEvBinds :: TcEvBinds Source

isEmptyTcEvBinds :: TcEvBinds -> Bool Source

data EvTerm Source

Constructors

EvId EvId |
EvCoercion TcCoercion |
EvCast EvTerm TcCoercion |
EvDFunApp DFunId [Type] [EvTerm] |
EvTupleSel EvTerm Int |
EvTupleMk [EvTerm] |
EvDelayedError Type FastString |
EvSuperClass EvTerm Int |
EvLit EvLit |

Instances

Data EvTerm |
Outputable EvTerm |
Typeable * EvTerm |

mkEvCast :: EvTerm -> TcCoercion -> EvTerm Source

evVarsOfTerm :: EvTerm -> VarSet Source

data EvLit Source

Constructors

EvNum Integer |
EvStr FastString |

Instances

Data EvLit |
Outputable EvLit |
Typeable * EvLit |

evTermCoercion :: EvTerm -> TcCoercion Source

data TcCoercion Source

Constructors

TcRefl Role TcType |
TcTyConAppCo Role TyCon [TcCoercion] |
TcAppCo TcCoercion TcCoercion |
TcForAllCo TyVar TcCoercion |
TcCoVarCo EqVar |
TcAxiomInstCo (CoAxiom Branched) Int [TcCoercion] |
TcAxiomRuleCo CoAxiomRule [TcType] [TcCoercion] |
TcPhantomCo TcType TcType |
TcSymCo TcCoercion |
TcTransCo TcCoercion TcCoercion |
TcNthCo Int TcCoercion |
TcLRCo LeftOrRight TcCoercion |
TcSubCo TcCoercion |
TcCastCo TcCoercion TcCoercion |
TcLetCo TcEvBinds TcCoercion |

Instances

Data TcCoercion |
Outputable TcCoercion |
Typeable * TcCoercion |

data LeftOrRight Source

Constructors

CLeft |
CRight |

Instances

Eq LeftOrRight |
Data LeftOrRight |
Outputable LeftOrRight |
Binary LeftOrRight |
Typeable * LeftOrRight |

pickLR :: LeftOrRight -> (a, a) -> a Source

mkTcReflCo :: Role -> TcType -> TcCoercion Source

mkTcNomReflCo :: TcType -> TcCoercion Source

mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion Source

mkTcAppCo :: TcCoercion -> TcCoercion -> TcCoercion Source

mkTcAppCos :: TcCoercion -> [TcCoercion] -> TcCoercion Source

mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion Source

mkTcAxInstCo :: Role -> CoAxiom br -> Int -> [TcType] -> TcCoercion Source

mkTcUnbranchedAxInstCo :: Role -> CoAxiom Unbranched -> [TcType] -> TcCoercion Source

mkTcForAllCo :: Var -> TcCoercion -> TcCoercion Source

mkTcForAllCos :: [Var] -> TcCoercion -> TcCoercion Source

mkTcSymCo :: TcCoercion -> TcCoercion Source

mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion Source

mkTcNthCo :: Int -> TcCoercion -> TcCoercion Source

mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion Source

mkTcSubCo :: TcCoercion -> TcCoercion Source

mkTcAxiomRuleCo :: CoAxiomRule -> [TcType] -> [TcCoercion] -> TcCoercion Source

tcCoercionKind :: TcCoercion -> Pair Type Source

coVarsOfTcCo :: TcCoercion -> VarSet Source

isEqVar :: Var -> Bool Source

mkTcCoVarCo :: EqVar -> TcCoercion Source

isTcReflCo :: TcCoercion -> Bool Source

isTcReflCo_maybe :: TcCoercion -> Maybe TcType Source

getTcCoVar_maybe :: TcCoercion -> Maybe CoVar Source

tcCoercionRole :: TcCoercion -> Role Source

eqVarRole :: EqVar -> Role Source

coercionToTcCoercion :: Coercion -> TcCoercion Source