HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

  • PackageAgda-2.8.0.2
  • Exports56
  • LanguageHaskell2010
  • LicenceMIT
  • SourceContext.hs

Modifying the context

Manipulating checkpoints --

Adding to the context

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

Instances21AddContext, …
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

valuegetVarInfo :: (MonadDebug 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.