HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleAgda-2.7.0.1Haskell2010

Agda.TypeChecking.Monad.Context

  • 1 type
  • 2 classes
  • 40 values
  • PackageAgda-2.7.0.1
  • Exports43
  • LanguageHaskell2010
  • LicenceMIT
  • SourceContext.hs

Modifying the context

6 declarations
valueunsafeEscapeContext :: MonadTCM tcm => Int -> tcm a -> tcm a
#

Delete the last n bindings from the context.

Doesn't update checkpoints! Use escapeContext or `updateContext rho (drop n)` instead, for an appropriate substitution rho.

Manipulating checkpoints --

4 declarations

Adding to the context

19 declarations
classclass MonadTCEnv m => MonadAddContext (m :: Type -> Type) where
#

Methods

Instances16MonadAddContext, …
valuewithShadowingNameTCM :: Name -> TCM b -> TCM b
#

Run the given TCM action, and register the given variable as being shadowed by all the names with the same root that are added to the context during this TCM action.

classclass AddContext b where
#

Various specializations of addCtx.

Methods

Instances20AddContext, …
valueremoveLetBindingsFrom :: MonadTCEnv m => Name -> m a -> m a
#

Remove a let bound variable and all let bindings introduced after it. For instance before printing its body to avoid folding the binding itself, or using bindings defined later. Relies on the invariant that names introduced later are sorted after earlier names.

Querying the context

14 declarations
valuegetVarInfo :: (MonadFail m, MonadTCEnv m) => Name -> m (Term, Dom Type)
#

Get the term corresponding to a named variable. If it is a lambda bound variable the deBruijn index is returned and if it is a let bound variable its definition is returned.