Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Core
- data TyCo
- data LCore
- data LCoreTC
- data CoreTC
- coreSyntaxEq :: Core -> Core -> Bool
- tyCoSyntaxEq :: TyCo -> TyCo -> Bool
- coreTCSyntaxEq :: CoreTC -> CoreTC -> Bool
- lcoreSyntaxEq :: LCore -> LCore -> Bool
- lcoreTCSyntaxEq :: LCoreTC -> LCoreTC -> Bool
- coreAlphaEq :: Core -> Core -> Bool
- tyCoAlphaEq :: TyCo -> TyCo -> Bool
- coreTCAlphaEq :: CoreTC -> CoreTC -> Bool
- freeVarsCore :: Core -> VarSet
- freeVarsTyCo :: TyCo -> VarSet
- freeVarsCoreTC :: CoreTC -> VarSet
- promoteModGutsT :: (Monad m, Injection ModGuts g) => Transform c m ModGuts b -> Transform c m g b
- promoteProgT :: (Monad m, Injection CoreProg g) => Transform c m CoreProg b -> Transform c m g b
- promoteBindT :: (Monad m, Injection CoreBind g) => Transform c m CoreBind b -> Transform c m g b
- promoteDefT :: (Monad m, Injection CoreDef g) => Transform c m CoreDef b -> Transform c m g b
- promoteExprT :: (Monad m, Injection CoreExpr g) => Transform c m CoreExpr b -> Transform c m g b
- promoteAltT :: (Monad m, Injection CoreAlt g) => Transform c m CoreAlt b -> Transform c m g b
- promoteTypeT :: (Monad m, Injection Type g) => Transform c m Type b -> Transform c m g b
- promoteCoercionT :: (Monad m, Injection Coercion g) => Transform c m Coercion b -> Transform c m g b
- promoteQuantifiedT :: (Monad m, Injection Quantified g) => Transform c m Quantified b -> Transform c m g b
- promoteClauseT :: (Monad m, Injection Clause g) => Transform c m Clause b -> Transform c m g b
- promoteCoreT :: (Monad m, Injection Core g) => Transform c m Core b -> Transform c m g b
- promoteLCoreT :: (Monad m, Injection LCore g) => Transform c m LCore b -> Transform c m g b
- promoteCoreTCT :: (Monad m, Injection CoreTC g) => Transform c m CoreTC b -> Transform c m g b
- promoteModGutsR :: (Monad m, Injection ModGuts g) => Rewrite c m ModGuts -> Rewrite c m g
- promoteProgR :: (Monad m, Injection CoreProg g) => Rewrite c m CoreProg -> Rewrite c m g
- promoteBindR :: (Monad m, Injection CoreBind g) => Rewrite c m CoreBind -> Rewrite c m g
- promoteDefR :: (Monad m, Injection CoreDef g) => Rewrite c m CoreDef -> Rewrite c m g
- promoteExprR :: (Monad m, Injection CoreExpr g) => Rewrite c m CoreExpr -> Rewrite c m g
- promoteAltR :: (Monad m, Injection CoreAlt g) => Rewrite c m CoreAlt -> Rewrite c m g
- promoteTypeR :: (Monad m, Injection Type g) => Rewrite c m Type -> Rewrite c m g
- promoteCoercionR :: (Monad m, Injection Coercion g) => Rewrite c m Coercion -> Rewrite c m g
- promoteQuantifiedR :: (Monad m, Injection Quantified g) => Rewrite c m Quantified -> Rewrite c m g
- promoteClauseR :: (Monad m, Injection Clause g) => Rewrite c m Clause -> Rewrite c m g
- promoteCoreR :: (Monad m, Injection Core g) => Rewrite c m Core -> Rewrite c m g
- promoteLCoreR :: (Monad m, Injection LCore g) => Rewrite c m LCore -> Rewrite c m g
- promoteCoreTCR :: (Monad m, Injection CoreTC g) => Rewrite c m CoreTC -> Rewrite c m g
- promoteExprBiR :: (Monad m, Injection CoreExpr g) => BiRewrite c m CoreExpr -> BiRewrite c m g
Universes
Core is a KURE universe for traversing GHC Core, excluding types and coercions. Core = ModGuts + CoreProg + CoreBind + CoreDef + CoreExpr + CoreAlt
GutsCore ModGuts | The module. |
ProgCore CoreProg | A program (a telescope of top-level binding groups). |
BindCore CoreBind | A binding group. |
DefCore CoreDef | A recursive definition. |
ExprCore CoreExpr | An expression. |
AltCore CoreAlt | A case alternative. |
(ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, HasEmptyContext c) => Walker c Core | Walking over modules, programs, binding groups, definitions, expressions and case alternatives. |
Injection ModGuts Core | |
Injection CoreExpr Core | |
Injection CoreBind Core | |
Injection CoreAlt Core | |
Injection CoreDef Core | |
Injection CoreProg Core | |
Injection Core LCoreTC | |
Injection Core LCore | |
Injection Core CoreTC |
TyCo is a KURE universe for traversing types and coercions. TyCo = Type + Coercion
TypeCore Type | A type. |
CoercionCore Coercion | A coercion. |
LCore is a KURE universe for traversing HERMIT lemmas and the Core expressions they contain.
Types and coercions are not traversed (for that, use LCoreTC
).
LCore = Core + Quantified + Clause
LCoreTC is a KURE universe for traversing HERMIT lemmas and the Core expressions they contain.
Unlike LCore
, types and coercions are also traversed.
LCore = LCore + TyCo
Core is a KURE universe for traversing GHC Core, including types and coercions. CoreTC = Core + TyCo
(ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, HasEmptyContext c) => Walker c CoreTC | Walking over modules, programs, binding groups, definitions, expressions, case alternatives, types and coercions. |
Injection ModGuts CoreTC | |
Injection CoreExpr CoreTC | |
Injection CoreBind CoreTC | |
Injection CoreAlt CoreTC | |
Injection Coercion CoreTC | |
Injection Type CoreTC | |
Injection CoreDef CoreTC | |
Injection CoreProg CoreTC | |
Injection CoreTC LCoreTC | |
Injection TyCo CoreTC | |
Injection Core CoreTC |
Equality
Syntactic Equality
Alpha Equality
Collecting Free Variables
freeVarsCore :: Core -> VarSet Source
Find all free variables in a Core
node.
freeVarsTyCo :: TyCo -> VarSet Source
Find all free variables in a TyCo
node.
freeVarsCoreTC :: CoreTC -> VarSet Source
Find all free variables in a CoreTC
node.
Promotion Combinators
Transform Promotions
promoteModGutsT :: (Monad m, Injection ModGuts g) => Transform c m ModGuts b -> Transform c m g b Source
Promote a translate on ModGuts
.
promoteProgT :: (Monad m, Injection CoreProg g) => Transform c m CoreProg b -> Transform c m g b Source
Promote a translate on CoreProg
.
promoteBindT :: (Monad m, Injection CoreBind g) => Transform c m CoreBind b -> Transform c m g b Source
Promote a translate on CoreBind
.
promoteDefT :: (Monad m, Injection CoreDef g) => Transform c m CoreDef b -> Transform c m g b Source
Promote a translate on CoreDef
.
promoteExprT :: (Monad m, Injection CoreExpr g) => Transform c m CoreExpr b -> Transform c m g b Source
Promote a translate on CoreExpr
.
promoteAltT :: (Monad m, Injection CoreAlt g) => Transform c m CoreAlt b -> Transform c m g b Source
Promote a translate on CoreAlt
.
promoteTypeT :: (Monad m, Injection Type g) => Transform c m Type b -> Transform c m g b Source
Promote a translate on Type
.
promoteCoercionT :: (Monad m, Injection Coercion g) => Transform c m Coercion b -> Transform c m g b Source
Promote a translate on Coercion
.
promoteQuantifiedT :: (Monad m, Injection Quantified g) => Transform c m Quantified b -> Transform c m g b Source
Promote a translate on Quantified
.
promoteClauseT :: (Monad m, Injection Clause g) => Transform c m Clause b -> Transform c m g b Source
Promote a translate on Clause
.
promoteCoreT :: (Monad m, Injection Core g) => Transform c m Core b -> Transform c m g b Source
Promote a translate on Core
.
promoteLCoreT :: (Monad m, Injection LCore g) => Transform c m LCore b -> Transform c m g b Source
Promote a translate on LCore
.
promoteCoreTCT :: (Monad m, Injection CoreTC g) => Transform c m CoreTC b -> Transform c m g b Source
Promote a translate on CoreTC
.
Rewrite Promotions
promoteModGutsR :: (Monad m, Injection ModGuts g) => Rewrite c m ModGuts -> Rewrite c m g Source
Promote a rewrite on ModGuts
.
promoteProgR :: (Monad m, Injection CoreProg g) => Rewrite c m CoreProg -> Rewrite c m g Source
Promote a rewrite on CoreProg
.
promoteBindR :: (Monad m, Injection CoreBind g) => Rewrite c m CoreBind -> Rewrite c m g Source
Promote a rewrite on CoreBind
.
promoteDefR :: (Monad m, Injection CoreDef g) => Rewrite c m CoreDef -> Rewrite c m g Source
Promote a rewrite on CoreDef
.
promoteExprR :: (Monad m, Injection CoreExpr g) => Rewrite c m CoreExpr -> Rewrite c m g Source
Promote a rewrite on CoreExpr
.
promoteAltR :: (Monad m, Injection CoreAlt g) => Rewrite c m CoreAlt -> Rewrite c m g Source
Promote a rewrite on CoreAlt
.
promoteTypeR :: (Monad m, Injection Type g) => Rewrite c m Type -> Rewrite c m g Source
Promote a rewrite on Type
.
promoteCoercionR :: (Monad m, Injection Coercion g) => Rewrite c m Coercion -> Rewrite c m g Source
Promote a rewrite on Coercion
.
promoteQuantifiedR :: (Monad m, Injection Quantified g) => Rewrite c m Quantified -> Rewrite c m g Source
Promote a rewrite on Quantified
.
promoteClauseR :: (Monad m, Injection Clause g) => Rewrite c m Clause -> Rewrite c m g Source
Promote a rewrite on Clause
.
promoteCoreR :: (Monad m, Injection Core g) => Rewrite c m Core -> Rewrite c m g Source
Promote a rewrite on Core
.
promoteLCoreR :: (Monad m, Injection LCore g) => Rewrite c m LCore -> Rewrite c m g Source
Promote a rewrite on Core
.
promoteCoreTCR :: (Monad m, Injection CoreTC g) => Rewrite c m CoreTC -> Rewrite c m g Source
Promote a rewrite on CoreTC
.