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.Signature

  • 1 type
  • 1 class
  • 96 values
  • PackageAgda-2.7.0.1
  • Exports98
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSignature.hs
valueaddSection :: ModuleName -> TCM ()
#

Add a section to the signature.

The current context will be stored as the cumulative module parameters for this section.

valuegetSection :: (Functor m, ReadTCState m) => ModuleName -> m (Maybe Section)
#

Get a section.

Why Maybe? The reason is that we look up all prefixes of a module to compute number of parameters, and for hierarchical top-level modules, A.B.C say, A and A.B do not exist.

valueaddDisplayForms :: QName -> TCM ()
#

Add display forms for a name f copied by a module application. Essentially if f can reduce to

λ xs → A.B.C.f vs

by unfolding module application copies (defCopy), then we add a display form

A.B.C.f vs ==> f xs
valueapplySection
  1. :: ModuleName

    Name of new module defined by the module macro.

  2. -> Telescope

    Parameters of new module.

  3. -> ModuleName

    Name of old module applied to arguments.

  4. -> Args

    Arguments of module application.

  5. -> ScopeCopyInfo

    Imported names and modules

  6. -> TCM ()
#

Module application (followed by module parameter abstraction).

datadata SigError
#

Signature lookup errors.

Constructors

  • SigUnknown String

    The name is not in the signature; default error message.

  • SigAbstract

    The name is not available, since it is abstract.

  • SigCubicalNotErasure

    The name is not available because it was defined in Cubical Agda, but the current language is Erased Cubical Agda, and --erasure is not active.

classclass (Functor m, Applicative m, MonadFail m, HasOptions m, MonadDebug m, MonadTCEnv m) => HasConstInfo (m :: Type -> Type) where
#

Methods

Instances17HasConstInfo, …
valuesetMutual :: QName -> [QName] -> TCM ()
#

Set the mutually recursive identifiers.

TODO: This produces data of quadratic size (which has to be processed upon serialization). Presumably qs is usually short, but in some cases (for instance for generated code) it may be long. It would be better to assign a unique identifier to each SCC, and store the names separately.

Compute the context variables to apply a definition to.

We have to insert the module telescope of the common prefix of the current module and the module where the definition comes from. (Properly raised to the current context.)

Example: module M₁ Γ where module M₁ Δ where f = ... module M₃ Θ where ... M₁.M₂.f [insert Γ raised by Θ]

valueinFreshModuleIfFreeParams :: TCM a -> TCM a
#

Unless all variables in the context are module parameters, create a fresh module to capture the non-module parameters. Used when unquoting to make sure generated definitions work properly.

valueinAbstractMode :: MonadTCEnv m => m a -> m a
#

Enter abstract mode. Abstract definition in the current module are transparent.

valuedroppedPars :: Definition -> Int
#

The number of dropped parameters for a definition. 0 except for projection(-like) functions and constructors.

valueisProperProjection :: Defn -> Bool
#

Returns True if we are dealing with a proper projection, i.e., not a projection-like function nor a record field value (projection applied to argument).