Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Convenient functions for compiling binders.
Synopsis
- withVarScoped ∷ CompilingDefault uni fun m ann ⇒ Var → (VarDecl TyName Name uni Ann → m a) → m a
- withVarTyScoped ∷ CompilingDefault uni fun m ann ⇒ Var → PIRType uni → (VarDecl TyName Name uni Ann → m a) → m a
- withVarsScoped ∷ CompilingDefault uni fun m ann ⇒ [Var] → ([VarDecl TyName Name uni Ann] → m a) → m a
- withTyVarScoped ∷ Compiling uni fun m ann ⇒ Var → (TyVarDecl TyName Ann → m a) → m a
- withTyVarsScoped ∷ Compiling uni fun m ann ⇒ [Var] → ([TyVarDecl TyName Ann] → m a) → m a
- mkLamAbsScoped ∷ CompilingDefault uni fun m ann ⇒ Var → m (PIRTerm uni fun) → m (PIRTerm uni fun)
- mkIterLamAbsScoped ∷ CompilingDefault uni fun m ann ⇒ [Var] → m (PIRTerm uni fun) → m (PIRTerm uni fun)
- mkTyAbsScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRTerm uni fun) → m (PIRTerm uni fun)
- mkIterTyAbsScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRTerm uni fun) → m (PIRTerm uni fun)
- mkTyForallScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRType uni) → m (PIRType uni)
- mkIterTyForallScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRType uni) → m (PIRType uni)
- mkTyLamScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRType uni) → m (PIRType uni)
- mkIterTyLamScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRType uni) → m (PIRType uni)
Documentation
withVarScoped ∷ CompilingDefault uni fun m ann ⇒ Var → (VarDecl TyName Name uni Ann → m a) → m a Source #
withVarTyScoped ∷ CompilingDefault uni fun m ann ⇒ Var → PIRType uni → (VarDecl TyName Name uni Ann → m a) → m a Source #
Like withVarScoped
, but takes a PIRType
, and uses it for the type
of the compiled Expr
.
withVarsScoped ∷ CompilingDefault uni fun m ann ⇒ [Var] → ([VarDecl TyName Name uni Ann] → m a) → m a Source #
mkLamAbsScoped ∷ CompilingDefault uni fun m ann ⇒ Var → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #
Builds a lambda, binding the given variable to a name that will be in scope when running the second argument.
mkIterLamAbsScoped ∷ CompilingDefault uni fun m ann ⇒ [Var] → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #
mkTyAbsScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #
Builds a type abstraction, binding the given variable to a name that will be in scope when running the second argument.
mkIterTyAbsScoped ∷ Compiling uni fun m ann ⇒ [Var] → m (PIRTerm uni fun) → m (PIRTerm uni fun) Source #
mkTyForallScoped ∷ Compiling uni fun m ann ⇒ Var → m (PIRType uni) → m (PIRType uni) Source #
Builds a forall, binding the given variable to a name that will be in scope when running the second argument.