| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Agda.TypeChecking.Names
Description
EDSL to construct terms without touching De Bruijn indices.
e.g. if given t, u :: Term, Γ ⊢ t, u : A, we can build "λ f. f t u" like this:
runNames [] $ do
  -- open binds t and u to computations that know how to weaken themselves in
  -- an extended context
- t,u
 - <- mapM open [t,u]
 
- - 
lamgives the illusion of HOAS by providing f as a computation - - It also extends the internal context with the name "f", so that
 - - 
tanduwill get weakened in the body. - - Then we finish the job using the (@) combinator from Agda.TypeChecking.Primitive
 
Documentation
Instances
cl' :: Applicative m => a -> NamesT m a Source #
bind' :: (MonadFail m, Subst t' b, DeBruijn b, Subst t a, Free a) => ArgName -> (NamesT m b -> NamesT m a) -> NamesT m a Source #
bind :: (MonadFail m, Subst t' b, DeBruijn b, Subst t a, Free a) => ArgName -> (NamesT m b -> NamesT m a) -> NamesT m (Abs a) Source #
glam :: MonadFail m => ArgInfo -> ArgName -> (NamesT m Term -> NamesT m Term) -> NamesT m Term Source #