hermit-0.3.2.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellNone

HERMIT.Kure

Contents

Synopsis

KURE

All the required functionality of KURE is exported here, so other modules do not need to import KURE directly.

Sub-Modules

Synonyms

Congruence combinators

Modguts

modGutsT :: (ExtendPath c Crumb, Monad m) => Translate c m CoreProg a -> (ModGuts -> a -> b) -> Translate c m ModGuts bSource

Translate a module. Slightly different to the other congruence combinators: it passes in all of the original to the reconstruction function.

modGutsR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoreProg -> Rewrite c m ModGutsSource

Rewrite the CoreProg child of a module.

Program

progNilT :: Monad m => b -> Translate c m CoreProg bSource

Translate an empty list.

progConsT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m CoreBind a1 -> Translate c m CoreProg a2 -> (a1 -> a2 -> b) -> Translate c m CoreProg bSource

Translate a program of the form: (CoreBind : CoreProg)

progConsAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m CoreBind -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite all children of a program of the form: (CoreBind : CoreProg)

progConsAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreBind -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite any children of a program of the form: (CoreBind : CoreProg)

progConsOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreBind -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite one child of a program of the form: (CoreBind : CoreProg)

Binding Groups

nonRecT :: (ExtendPath c Crumb, Monad m) => Translate c m Var a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreBind bSource

Translate a binding group of the form: NonRec Var CoreExpr

nonRecAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreBindSource

Rewrite all children of a binding group of the form: NonRec Var CoreExpr

nonRecAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreBindSource

Rewrite any children of a binding group of the form: NonRec Var CoreExpr

nonRecOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreBindSource

Rewrite one child of a binding group of the form: NonRec Var CoreExpr

recT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Translate c m CoreDef a) -> ([a] -> b) -> Translate c m CoreBind bSource

Translate a binding group of the form: Rec [CoreDef]

recAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreBindSource

Rewrite all children of a binding group of the form: Rec [CoreDef]

recAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreBindSource

Rewrite any children of a binding group of the form: Rec [CoreDef]

recOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreBindSource

Rewrite one child of a binding group of the form: Rec [CoreDef]

Recursive Definitions

defT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m Id a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreDef bSource

Translate a recursive definition of the form: Def Id CoreExpr

defAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m Id -> Rewrite c m CoreExpr -> Rewrite c m CoreDefSource

Rewrite all children of a recursive definition of the form: Def Id CoreExpr

defAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Id -> Rewrite c m CoreExpr -> Rewrite c m CoreDefSource

Rewrite any children of a recursive definition of the form: Def Id CoreExpr

defOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Id -> Rewrite c m CoreExpr -> Rewrite c m CoreDefSource

Rewrite one child of a recursive definition of the form: Def Id CoreExpr

Case Alternatives

altT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m AltCon a1 -> (Int -> Translate c m Var a2) -> Translate c m CoreExpr a3 -> (a1 -> [a2] -> a3 -> b) -> Translate c m CoreAlt bSource

Translate a case alternative of the form: (AltCon, [Var], CoreExpr)

altAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m AltCon -> (Int -> Rewrite c m Var) -> Rewrite c m CoreExpr -> Rewrite c m CoreAltSource

Rewrite all children of a case alternative of the form: (AltCon, Id, CoreExpr)

altAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m AltCon -> (Int -> Rewrite c m Var) -> Rewrite c m CoreExpr -> Rewrite c m CoreAltSource

Rewrite any children of a case alternative of the form: (AltCon, Id, CoreExpr)

altOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m AltCon -> (Int -> Rewrite c m Var) -> Rewrite c m CoreExpr -> Rewrite c m CoreAltSource

Rewrite one child of a case alternative of the form: (AltCon, Id, CoreExpr)

Expressions

varT :: (ExtendPath c Crumb, Monad m) => Translate c m Id b -> Translate c m CoreExpr bSource

Translate an expression of the form: Var Id

varR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Id -> Rewrite c m CoreExprSource

Rewrite the Id child in an expression of the form: Var Id

litT :: (ExtendPath c Crumb, Monad m) => Translate c m Literal b -> Translate c m CoreExpr bSource

Translate an expression of the form: Lit Literal

litR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Literal -> Rewrite c m CoreExprSource

Rewrite the Literal child in an expression of the form: Lit Literal

appT :: (ExtendPath c Crumb, Monad m) => Translate c m CoreExpr a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: App CoreExpr CoreExpr

appAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: App CoreExpr CoreExpr

appAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: App CoreExpr CoreExpr

appOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: App CoreExpr CoreExpr

lamT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m Var a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Lam Var CoreExpr

lamAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Lam Var CoreExpr

lamAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Lam Var CoreExpr

lamOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Lam Var CoreExpr

letT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m CoreBind a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Let CoreBind CoreExpr

letAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m CoreBind -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Let CoreBind CoreExpr

letAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreBind -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Let CoreBind CoreExpr

letOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreBind -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Let CoreBind CoreExpr

caseT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m CoreExpr e -> Translate c m Id w -> Translate c m Type ty -> (Int -> Translate c m CoreAlt alt) -> (e -> w -> ty -> [alt] -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Case CoreExpr Id Type [CoreAlt]

caseAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> Rewrite c m CoreAlt) -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Case CoreExpr Id Type [CoreAlt]

caseAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> Rewrite c m CoreAlt) -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Case CoreExpr Id Type [CoreAlt]

caseOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> Rewrite c m CoreAlt) -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Case CoreExpr Id Type [CoreAlt]

castT :: (ExtendPath c Crumb, Monad m) => Translate c m CoreExpr a1 -> Translate c m Coercion a2 -> (a1 -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Cast CoreExpr Coercion

castAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoreExpr -> Rewrite c m Coercion -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Cast CoreExpr Coercion

castAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Coercion -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Cast CoreExpr Coercion

castOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Coercion -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Cast CoreExpr Coercion

tickT :: (ExtendPath c Crumb, Monad m) => Translate c m CoreTickish a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Tick CoreTickish CoreExpr

tickAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoreTickish -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Tick CoreTickish CoreExpr

tickAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreTickish -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Tick CoreTickish CoreExpr

tickOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoreTickish -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Tick CoreTickish CoreExpr

typeT :: (ExtendPath c Crumb, Monad m) => Translate c m Type b -> Translate c m CoreExpr bSource

Translate an expression of the form: Type Type

typeR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Type -> Rewrite c m CoreExprSource

Rewrite the Type child in an expression of the form: Type Type

coercionT :: (ExtendPath c Crumb, Monad m) => Translate c m Coercion b -> Translate c m CoreExpr bSource

Translate an expression of the form: Coercion Coercion

coercionR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Coercion -> Rewrite c m CoreExprSource

Rewrite the Coercion child in an expression of the form: Coercion Coercion

Composite Congruence Combinators

defOrNonRecT :: (Injection CoreBind g, Injection CoreDef g, ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Translate c m Var a1 -> Translate c m CoreExpr a2 -> (a1 -> a2 -> b) -> Translate c m g bSource

Translate a definition of the form NonRec Var CoreExpr or Def Id CoreExpr

defOrNonRecAllR :: (Injection CoreBind g, Injection CoreDef g, ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m gSource

Rewrite all children of a definition of the form NonRec Var CoreExpr or Def Id CoreExpr

defOrNonRecAnyR :: (Injection CoreBind g, Injection CoreDef g, ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m gSource

Rewrite any children of a definition of the form NonRec Var CoreExpr or Def Id CoreExpr

defOrNonRecOneR :: (Injection CoreBind g, Injection CoreDef g, ExtendPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m gSource

Rewrite one child of a definition of the form NonRec Var CoreExpr or Def Id CoreExpr

recDefT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Translate c m Id a1, Translate c m CoreExpr a2)) -> ([(a1, a2)] -> b) -> Translate c m CoreBind bSource

Translate a binding group of the form: Rec [(Id, CoreExpr)]

recDefAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreBindSource

Rewrite all children of a binding group of the form: Rec [(Id, CoreExpr)]

recDefAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreBindSource

Rewrite any children of a binding group of the form: Rec [(Id, CoreExpr)]

recDefOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreBindSource

Rewrite one child of a binding group of the form: Rec [(Id, CoreExpr)]

letNonRecT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m Var a1 -> Translate c m CoreExpr a2 -> Translate c m CoreExpr a3 -> (a1 -> a2 -> a3 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Let (NonRec Var CoreExpr) CoreExpr

letNonRecAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Let (NonRec Var CoreExpr) CoreExpr

letNonRecAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Let (NonRec Var CoreExpr) CoreExpr

letNonRecOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Let (NonRec Var CoreExpr) CoreExpr

letRecT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Translate c m CoreDef a1) -> Translate c m CoreExpr a2 -> ([a1] -> a2 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Let (Rec [CoreDef]) CoreExpr

letRecAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Let (Rec [CoreDef]) CoreExpr

letRecAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Let (Rec [CoreDef]) CoreExpr

letRecOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Let (Rec [CoreDef]) CoreExpr

letRecDefT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Translate c m Id a1, Translate c m CoreExpr a2)) -> Translate c m CoreExpr a3 -> ([(a1, a2)] -> a3 -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Let (Rec [(Id, CoreExpr)]) CoreExpr

letRecDefAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Let (Rec [(Id, CoreExpr)]) CoreExpr

letRecDefAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Let (Rec [(Id, CoreExpr)]) CoreExpr

letRecDefOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreExpr -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Let (Rec [(Id, CoreExpr)]) CoreExpr

consNonRecT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m Var a1 -> Translate c m CoreExpr a2 -> Translate c m CoreProg a3 -> (a1 -> a2 -> a3 -> b) -> Translate c m CoreProg bSource

Translate a program of the form: (NonRec Var CoreExpr) : CoreProg

consNonRecAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite all children of an expression of the form: (NonRec Var CoreExpr) : CoreProg

consNonRecAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite any children of an expression of the form: (NonRec Var CoreExpr) : CoreProg

consNonRecOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m CoreExpr -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite one child of an expression of the form: (NonRec Var CoreExpr) : CoreProg

consRecT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Translate c m CoreDef a1) -> Translate c m CoreProg a2 -> ([a1] -> a2 -> b) -> Translate c m CoreProg bSource

Translate an expression of the form: (Rec [CoreDef]) : CoreProg

consRecAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite all children of an expression of the form: (Rec [CoreDef]) : CoreProg

consRecAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite any children of an expression of the form: (Rec [CoreDef]) : CoreProg

consRecOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> Rewrite c m CoreDef) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite one child of an expression of the form: (Rec [CoreDef]) : CoreProg

consRecDefT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Translate c m Id a1, Translate c m CoreExpr a2)) -> Translate c m CoreProg a3 -> ([(a1, a2)] -> a3 -> b) -> Translate c m CoreProg bSource

Translate an expression of the form: (Rec [(Id, CoreExpr)]) : CoreProg

consRecDefAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite all children of an expression of the form: (Rec [(Id, CoreExpr)]) : CoreProg

consRecDefAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite any children of an expression of the form: (Rec [(Id, CoreExpr)]) : CoreProg

consRecDefOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => (Int -> (Rewrite c m Id, Rewrite c m CoreExpr)) -> Rewrite c m CoreProg -> Rewrite c m CoreProgSource

Rewrite one child of an expression of the form: (Rec [(Id, CoreExpr)]) : CoreProg

caseAltT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m CoreExpr sc -> Translate c m Id w -> Translate c m Type ty -> (Int -> (Translate c m AltCon con, Int -> Translate c m Var v, Translate c m CoreExpr rhs)) -> (sc -> w -> ty -> [(con, [v], rhs)] -> b) -> Translate c m CoreExpr bSource

Translate an expression of the form: Case CoreExpr Id Type [(AltCon, [Var], CoreExpr)]

caseAltAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> (Rewrite c m AltCon, Int -> Rewrite c m Var, Rewrite c m CoreExpr)) -> Rewrite c m CoreExprSource

Rewrite all children of an expression of the form: Case CoreExpr Id Type [(AltCon, [Var], CoreExpr)]

caseAltAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> (Rewrite c m AltCon, Int -> Rewrite c m Var, Rewrite c m CoreExpr)) -> Rewrite c m CoreExprSource

Rewrite any children of an expression of the form: Case CoreExpr Id Type [(AltCon, [Var], CoreExpr)]

caseAltOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> (Rewrite c m AltCon, Int -> Rewrite c m Var, Rewrite c m CoreExpr)) -> Rewrite c m CoreExprSource

Rewrite one child of an expression of the form: Case CoreExpr Id Type [(AltCon, [Var], CoreExpr)]

Types

tyVarT :: (ExtendPath c Crumb, Monad m) => Translate c m TyVar b -> Translate c m Type bSource

Translate a type of the form: TyVarTy TyVar

tyVarR :: (ExtendPath c Crumb, Monad m) => Rewrite c m TyVar -> Rewrite c m TypeSource

Rewrite the TyVar child of a type of the form: TyVarTy TyVar

litTyT :: (ExtendPath c Crumb, Monad m) => Translate c m TyLit b -> Translate c m Type bSource

Translate a type of the form: LitTy TyLit

litTyR :: (ExtendPath c Crumb, Monad m) => Rewrite c m TyLit -> Rewrite c m TypeSource

Rewrite the TyLit child of a type of the form: LitTy TyLit

appTyT :: (ExtendPath c Crumb, Monad m) => Translate c m Type a1 -> Translate c m Type a2 -> (a1 -> a2 -> b) -> Translate c m Type bSource

Translate a type of the form: AppTy Type Type

appTyAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite all children of a type of the form: AppTy Type Type

appTyAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite any children of a type of the form: AppTy Type Type

appTyOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite one child of a type of the form: AppTy Type Type

funTyT :: (ExtendPath c Crumb, Monad m) => Translate c m Type a1 -> Translate c m Type a2 -> (a1 -> a2 -> b) -> Translate c m Type bSource

Translate a type of the form: FunTy Type Type

funTyAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite all children of a type of the form: FunTy Type Type

funTyAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite any children of a type of the form: FunTy Type Type

funTyOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite one child of a type of the form: FunTy Type Type

forAllTyT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m Var a1 -> Translate c m Type a2 -> (a1 -> a2 -> b) -> Translate c m Type bSource

Translate a type of the form: ForAllTy Var Type

forAllTyAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m Var -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite all children of a type of the form: ForAllTy Var Type

forAllTyAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite any children of a type of the form: ForAllTy Var Type

forAllTyOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m Var -> Rewrite c m Type -> Rewrite c m TypeSource

Rewrite one child of a type of the form: ForAllTy Var Type

tyConAppT :: (ExtendPath c Crumb, Monad m) => Translate c m TyCon a1 -> (Int -> Translate c m KindOrType a2) -> (a1 -> [a2] -> b) -> Translate c m Type bSource

Translate a type of the form: TyConApp TyCon [KindOrType]

tyConAppAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m TyCon -> (Int -> Rewrite c m KindOrType) -> Rewrite c m TypeSource

Rewrite all children of a type of the form: TyConApp TyCon [KindOrType]

tyConAppAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m KindOrType) -> Rewrite c m TypeSource

Rewrite any children of a type of the form: TyConApp TyCon [KindOrType]

tyConAppOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m KindOrType) -> Rewrite c m TypeSource

Rewrite one child of a type of the form: TyConApp TyCon [KindOrType]

Coercions

reflT :: (ExtendPath c Crumb, Monad m) => Translate c m Type b -> Translate c m Coercion bSource

Translate a coercion of the form: Refl Type

reflR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite the Type child of a coercion of the form: Refl Type

tyConAppCoT :: (ExtendPath c Crumb, Monad m) => Translate c m TyCon a1 -> (Int -> Translate c m Coercion a2) -> (a1 -> [a2] -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: TyConAppCo TyCon [Coercion]

tyConAppCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m TyCon -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: TyConAppCo TyCon [Coercion]

tyConAppCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: TyConAppCo TyCon [Coercion]

tyConAppCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: TyConAppCo TyCon [Coercion]

appCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Coercion a1 -> Translate c m Coercion a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: AppCo Coercion Coercion

appCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: AppCo Coercion Coercion

appCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: AppCo Coercion Coercion

appCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: AppCo Coercion Coercion

forAllCoT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Translate c m TyVar a1 -> Translate c m Coercion a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: ForAllCo TyVar Coercion

forAllCoAllR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Rewrite c m TyVar -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: ForAllCo TyVar Coercion

forAllCoAnyR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m TyVar -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: ForAllCo TyVar Coercion

forAllCoOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m TyVar -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: ForAllCo TyVar Coercion

coVarCoT :: (ExtendPath c Crumb, Monad m) => Translate c m CoVar b -> Translate c m Coercion bSource

Translate a coercion of the form: CoVarCo CoVar

coVarCoR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoVar -> Rewrite c m CoercionSource

Rewrite the CoVar child of a coercion of the form: CoVarCo CoVar

axiomInstCoT :: (ExtendPath c Crumb, Monad m) => Translate c m CoAxiom a1 -> (Int -> Translate c m Coercion a2) -> (a1 -> [a2] -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: AxiomInstCo CoAxiom [Coercion]

axiomInstCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m CoAxiom -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: AxiomInstCo CoAxiom [Coercion]

axiomInstCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoAxiom -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: AxiomInstCo CoAxiom [Coercion]

axiomInstCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m CoAxiom -> (Int -> Rewrite c m Coercion) -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: AxiomInstCo CoAxiom [Coercion]

unsafeCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Type a1 -> Translate c m Type a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: UnsafeCo Type Type

unsafeCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: UnsafeCo Type Type

unsafeCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: UnsafeCo Type Type

unsafeCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Type -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: UnsafeCo Type Type

symCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Coercion b -> Translate c m Coercion bSource

Translate a coercion of the form: SymCo Coercion

symCoR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite the Coercion child of a coercion of the form: SymCo Coercion

transCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Coercion a1 -> Translate c m Coercion a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: TransCo Coercion Coercion

transCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: TransCo Coercion Coercion

transCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: TransCo Coercion Coercion

transCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: TransCo Coercion Coercion

nthCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Int a1 -> Translate c m Coercion a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: NthCo Int Coercion

nthCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Int -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: NthCo Int Coercion

nthCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Int -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: NthCo Int Coercion

nthCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Int -> Rewrite c m Coercion -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: NthCo Int Coercion

instCoT :: (ExtendPath c Crumb, Monad m) => Translate c m Coercion a1 -> Translate c m Type a2 -> (a1 -> a2 -> b) -> Translate c m Coercion bSource

Translate a coercion of the form: InstCo Coercion Type

instCoAllR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Coercion -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite all children of a coercion of the form: InstCo Coercion Type

instCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite any children of a coercion of the form: InstCo Coercion Type

instCoOneR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Coercion -> Rewrite c m Type -> Rewrite c m CoercionSource

Rewrite one child of a coercion of the form: InstCo Coercion Type

Conversion to deprecated Int representation

deprecatedIntToCrumbT :: Monad m => Int -> Translate c m Core CrumbSource

Earlier versions of HERMIT used Int as the crumb type. This translation maps an Int to the corresponding Crumb, for backwards compatibility purposes.

deprecatedIntToPathT :: Monad m => Int -> Translate c m Core LocalPathHSource

Builds a path to the first child, based on the old numbering system.