HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

ModuleAgda-2.8.0.2Haskell2010

Agda.TypeChecking.Monad.Signature

Synopsis
  • PackageAgda-2.8.0.2
  • Exports100
  • 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.

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
classclass ChaseDisplayForms a where

Find all names used (recursively) by display forms of a given name.

Methods

Instances6ChaseDisplayForms
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, HasOptions m, MonadDebug m, MonadTCEnv m) => HasConstInfo (m :: Type -> Type) where
#

Methods

  • getConstInfo :: QName -> m Definition

    Lookup the definition of a name. The result is a closed thing, all free variables have been abstracted over.

  • getConstInfo' :: QName -> m (Either SigError Definition)

    Version that reports exceptions:

  • getRewriteRulesFor :: QName -> m RewriteRules

    Return the rewrite rules for the given head symbol that could be tried. Not categorically all rewrite rules are returned, in particular, none when reduction of the head symbol is disabled. Rewrite rules that only happen to be in the signature but are not in scope are also not returned.

Instances17HasConstInfo, …

Return the rewrite rules for the given head symbol that could be tried. Not categorically all rewrite rules are returned, e.g. none when reduction of the head symbol is disabled. Rewrite rules that only happen to be in the signature but are not in scope are also not returned.

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.

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.

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

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