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.Compiler.Backend

Interface for compiler backend writers.

  • 192 types
  • 31 classes
  • 1368 values
  • PackageAgda-2.7.0.1
  • Exports1611
  • LanguageHaskell2010
  • LicenceMIT
  • SourceBackend.hs
typetype Flag opts = opts -> OptM opts
#

f :: Flag opts is an action on the option record that results from parsing an option. f opts produces either an error message or an updated options record

datadata TCErr
#

Type-checking errors.

Constructors

Instances23Show, Exception, NFData, HasRange, MonadError, Pretty, …
datadata Definition
#

Constructors

Instances16Show, Generic, NFData, Pretty, KillRange, LensArgInfo, …
datadata Builtin pf
#

Constructors

Instances10Functor, Foldable, Traversable, Show, Generic, NFData, …
datadata System
#

An alternative representation of partial elements in a telescope: Γ ⊢ λ Δ. [φ₁ u₁, ... , φₙ uₙ] : Δ → PartialP (∨_ᵢ φᵢ) T see cubicaltt paper (however we do not store the type T).

Constructors

Instances12Show, Generic, NFData, KillRange, NamesIn, Abstract, …
newtypenewtype TCMT (m :: Type -> Type) a
#

The type checking monad transformer. Adds readonly TCEnv and mutable TCState.

Constructors

Instances42MonadTrans, MonadBench, MonadBlock, MonadStConcreteNames, MonadConstraint, MonadAddContext, …
classclass (Functor m, Applicative m, MonadFail m, HasOptions m, MonadDebug m, MonadTCEnv m) => HasConstInfo (m :: Type -> Type) where
#

Methods

Instances17HasConstInfo, …
datadata TypeCheckAction
#

A complete log for a module will look like this:

Instances3Generic, NFData, Rep
datadata MetaClass
#

Various classes of metavariables.

Constructors

  • Records

    Meta variables of record type.

  • SingletonRecords

    Meta variables of "hereditarily singleton" record type.

  • Levels

    Meta variables of level type, if type-in-type is activated.

Instances4Bounded, Enum, Eq, Show
  • Bounded MetaClassDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.MetaVars
  • Enum MetaClassDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.MetaVars
  • Eq MetaClassDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.MetaVars
  • Show MetaClassDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.MetaVars
newtypenewtype ReduceM a
#

Constructors

Instances13Monad, Functor, MonadFail, Applicative, HasOptions, MonadReduce, …
classclass (Functor m, Applicative m, Monad m) => MonadDebug (m :: Type -> Type) where
#

Methods

Instances17MonadDebug, …
datadata HighlightingLevel
#

How much highlighting should be sent to the user interface?

Constructors

  • None
  • NonInteractive
  • Interactive

    This includes both non-interactive highlighting and interactive highlighting of the expression that is currently being type-checked.

Instances7Eq, Ord, Read, Show, Generic, NFData, …
datadata HighlightingMethod
#

How should highlighting be sent to the user interface?

Constructors

Instances6Eq, Read, Show, Generic, NFData, Rep
datadata Comparison
#
Instances8Eq, Show, Generic, NFData, Pretty, PrettyTCM, …
datadata Polarity
#

Polarity for equality and subtype checking.

Constructors

Instances12Eq, Show, Generic, NFData, Pretty, PrettyTCM, …
datadata Open a
#

A thing tagged with the context it came from. Also keeps the substitution from previous checkpoints. This lets us handle the case when an open thing was created in a context that we have since exited. Remember which module it's from to make sure we don't get confused by checkpoints from other files.

Instances13Functor, Foldable, Traversable, Decoration, Show, Generic, …
datadata MetaInfo
#

MetaInfo is cloned from one meta to the next during pruning.

Constructors

Instances10Generic, NFData, HasRange, SetRange, LensIsAbstract, LensModality, …
datadata Constraint
#

Constructors

Instances19Show, Generic, NFData, HasRange, Subst, PrettyTCM, …
datadata Signature
#
Instances7Show, Generic, NFData, KillRange, InstantiateFull, EmbPrj, …
datadata Warning
#

A non-fatal error is an error which does not prevent us from checking the document further and interacting with the user.

Constructors

Instances5Show, Generic, NFData, EmbPrj, Rep
datadata TCWarning
#

Constructors

Instances12Eq, Show, Generic, NFData, HasRange, PrettyTCM, …
datadata NamedMeta
#

For printing, we couple a meta with its name suggestion.

Instances5Pretty, PrettyTCM, ToConcrete, EncodeTCM, ConOfAbs
datadata ModuleInfo
#

Constructors

Instances3Generic, NFData, Rep
classclass (MonadTCEnv m, ReadTCState m) => MonadTrace (m :: Type -> Type) where
#

Methods

Instances6MonadTrace
valuehighlightAsTypeChecked
  1. :: MonadTrace m
  2. => Range
    rPre
  3. -> Range
    r
  4. -> m a
  5. -> m a
#

highlightAsTypeChecked rPre r m runs m and returns its result. Additionally, some code may be highlighted:

  • If r is non-empty and not a sub-range of rPre (after continuousPerLine has been applied to both): r is highlighted as being type-checked while m is running (this highlighting is removed if m completes successfully).

  • Otherwise: Highlighting is removed for rPre - r before m runs, and if m completes successfully, then rPre - r is highlighted as being type-checked.

Sets the command line options (both persistent and pragma options are updated).

Relative include directories are made absolute with respect to the current working directory. If the include directories have changed then the state is reset (partly, see setIncludeDirs).

An empty list of relative include directories (Left []) is interpreted as ["."].

Callback fuction to call when there is a response to give to the interactive frontend.

Note that the response is given in pieces and incrementally, so the user can have timely response even during long computations.

Typical InteractionOutputCallback functions:

  • Convert the response into a String representation and print it on standard output (suitable for inter-process communication).

  • Put the response into a mutable variable stored in the closure of the InteractionOutputCallback function. (suitable for intra-process communication).

datadata IPFace' t
#

Datatype representing a single boundary condition: x_0 = u_0, ... ,x_n = u_n ⊢ t = ?n es

Constructors

Instances1Pretty
classclass (Functor m, Applicative m, Monad m) => HasOptions (m :: Type -> Type) where
#

Methods

Instances20HasOptions, …
classclass Monad m => MonadTCEnv (m :: Type -> Type) where
#

MonadTCEnv made into its own dedicated service class. This allows us to use MonadReader for ReaderT extensions of TCM.

Methods

Instances20MonadTCEnv, …
classclass (Applicative tcm, MonadIO tcm, MonadTCEnv tcm, MonadTCState tcm, HasOptions tcm) => MonadTCM (tcm :: Type -> Type) where
#

Embedding a TCM computation.

Methods

Instances15MonadTCM, …
classclass Monad m => MonadTCState (m :: Type -> Type) where
#

MonadTCState made into its own dedicated service class. This allows us to use MonadState for StateT extensions of TCM.

Methods

Instances15MonadTCState, …
classclass Monad m => ReadTCState (m :: Type -> Type) where
#

Methods

Instances19ReadTCState, …
datadata SomeBuiltin
#

Either a BuiltinId or PrimitiveId, used for some lookups.

Instances9Eq, Ord, Show, Generic, NFData, Hashable, …

Builtins that come without a definition in Agda syntax. These are giving names to Agda internal concepts which cannot be assigned an Agda type.

An example would be a user-defined name for Set.

{-# BUILTIN TYPE Type #-}

The type of Type would be Type : Level → Setω which is not valid Agda.

datadata TypeError
#

Constructors

Instances5Show, Generic, NFData, PrettyTCM, Rep
datadata LHSOrPatSyn
#

Distinguish error message when parsing lhs or pattern synonym, resp.

Instances8Bounded, Enum, Eq, Show, Generic, NFData, …
datadata Call
#
Instances6Generic, NFData, Pretty, HasRange, PrettyTCM, Rep
classclass (Functor m, Applicative m, MonadFail m) => HasBuiltins (m :: Type -> Type) where
#
Instances17HasBuiltins, …
valuesetCurrentRange :: (MonadTrace m, HasRange x) => x -> m a -> m a
#

Sets the current range (for error messages etc.) to the range of the given object, if it has a range (i.e., its range is not noRange).

datadata DisplayForm
#

A DisplayForm is in essence a rewrite rule q ts --> dt for a defined symbol (could be a constructor as well) q. The right hand side is a DisplayTerm which is used to reify to a more readable Abstract.Syntax.

The patterns ts are just terms, but the first dfPatternVars variables are pattern variables that matches any term.

Constructors

  • Display
    • dfPatternVars :: Nat

      Number n of pattern variables in dfPats.

    • dfPats :: Elims

      Left hand side patterns, the n first free variables are pattern variables, any variables above n are fixed and only match that particular variable. This happens when you have display forms inside parameterised modules that match on the module parameters. The ArgInfo is ignored in these patterns.

    • dfRHS :: DisplayTerm

      Right hand side.

Instances14Show, Generic, NFData, Pretty, Subst, Simplify, …
classclass (MonadTCEnv m, ReadTCState m, MonadError TCErr m, MonadBlock m, HasOptions m, MonadDebug m) => MonadConstraint (m :: Type -> Type) where
#

Monad service class containing methods for adding and solving constraints

Methods

Instances3MonadConstraint
datadata Closure a
#
Instances18Functor, Foldable, Show, Generic, NFData, LensTCEnv, …
datadata RecordFieldWarning
#
Instances5Show, Generic, NFData, EmbPrj, Rep
datadata BuiltinId
#

A builtin name, defined by the BUILTIN pragma.

BuiltinNatBuiltinSucBuiltinZeroBuiltinNatPlusBuiltinNatMinusBuiltinNatTimesBuiltinNatDivSucAuxBuiltinNatModSucAuxBuiltinNatEqualsBuiltinNatLessBuiltinWord64BuiltinIntegerBuiltinIntegerPosBuiltinIntegerNegSucBuiltinFloatBuiltinCharBuiltinStringBuiltinUnitBuiltinUnitUnitBuiltinSigmaBuiltinSigmaConBuiltinBoolBuiltinTrueBuiltinFalseBuiltinListBuiltinNilBuiltinConsBuiltinMaybeBuiltinNothingBuiltinJustBuiltinIOBuiltinIdBuiltinReflIdBuiltinPathBuiltinPathPBuiltinIntervalUnivBuiltinIntervalBuiltinIZeroBuiltinIOneBuiltinPartialBuiltinPartialPBuiltinIsOneBuiltinItIsOneBuiltinEquivBuiltinEquivFunBuiltinEquivProofBuiltinTranspProofBuiltinIsOne1BuiltinIsOne2BuiltinIsOneEmptyBuiltinSubBuiltinSubInBuiltinSizeUnivBuiltinSizeBuiltinSizeLtBuiltinSizeSucBuiltinSizeInfBuiltinSizeMaxBuiltinInfBuiltinSharpBuiltinFlatBuiltinEqualityBuiltinReflBuiltinRewriteBuiltinLevelMaxBuiltinLevelBuiltinLevelZeroBuiltinLevelSucBuiltinPropBuiltinSetBuiltinStrictSetBuiltinPropOmegaBuiltinSetOmegaBuiltinSSetOmegaBuiltinLevelUnivBuiltinFromNatBuiltinFromNegBuiltinFromStringBuiltinQNameBuiltinAgdaSortBuiltinAgdaSortSetBuiltinAgdaSortLitBuiltinAgdaSortPropBuiltinAgdaSortPropLitBuiltinAgdaSortInfBuiltinAgdaSortUnsupportedBuiltinHidingBuiltinHiddenBuiltinInstanceBuiltinVisibleBuiltinRelevanceBuiltinRelevantBuiltinIrrelevantBuiltinQuantityBuiltinQuantity0BuiltinQuantityωBuiltinModalityBuiltinModalityConstructorBuiltinAssocBuiltinAssocLeftBuiltinAssocRightBuiltinAssocNonBuiltinPrecedenceBuiltinPrecRelatedBuiltinPrecUnrelatedBuiltinFixityBuiltinFixityFixityBuiltinArgBuiltinArgInfoBuiltinArgArgInfoBuiltinArgArgBuiltinAbsBuiltinAbsAbsBuiltinAgdaTermBuiltinAgdaTermVarBuiltinAgdaTermLamBuiltinAgdaTermExtLamBuiltinAgdaTermDefBuiltinAgdaTermConBuiltinAgdaTermPiBuiltinAgdaTermSortBuiltinAgdaTermLitBuiltinAgdaTermUnsupportedBuiltinAgdaTermMetaBuiltinAgdaErrorPartBuiltinAgdaErrorPartStringBuiltinAgdaErrorPartTermBuiltinAgdaErrorPartPattBuiltinAgdaErrorPartNameBuiltinAgdaLiteralBuiltinAgdaLitNatBuiltinAgdaLitWord64BuiltinAgdaLitFloatBuiltinAgdaLitCharBuiltinAgdaLitStringBuiltinAgdaLitQNameBuiltinAgdaLitMetaBuiltinAgdaClauseBuiltinAgdaClauseClauseBuiltinAgdaClauseAbsurdBuiltinAgdaPatternBuiltinAgdaPatVarBuiltinAgdaPatConBuiltinAgdaPatDotBuiltinAgdaPatLitBuiltinAgdaPatProjBuiltinAgdaPatAbsurdBuiltinAgdaDefinitionFunDefBuiltinAgdaDefinitionDataDefBuiltinAgdaDefinitionRecordDefBuiltinAgdaDefinitionDataConstructorBuiltinAgdaDefinitionPostulateBuiltinAgdaDefinitionPrimitiveBuiltinAgdaDefinitionBuiltinAgdaMetaBuiltinAgdaTCMBuiltinAgdaTCMReturnBuiltinAgdaTCMBindBuiltinAgdaTCMUnifyBuiltinAgdaTCMTypeErrorBuiltinAgdaTCMInferTypeBuiltinAgdaTCMCheckTypeBuiltinAgdaTCMNormaliseBuiltinAgdaTCMReduceBuiltinAgdaTCMCatchErrorBuiltinAgdaTCMGetContextBuiltinAgdaTCMExtendContextBuiltinAgdaTCMInContextBuiltinAgdaTCMFreshNameBuiltinAgdaTCMDeclareDefBuiltinAgdaTCMDeclarePostulateBuiltinAgdaTCMDeclareDataBuiltinAgdaTCMDefineDataBuiltinAgdaTCMDefineFunBuiltinAgdaTCMGetTypeBuiltinAgdaTCMGetDefinitionBuiltinAgdaTCMBlockBuiltinAgdaTCMCommitBuiltinAgdaTCMQuoteTermBuiltinAgdaTCMUnquoteTermBuiltinAgdaTCMQuoteOmegaTermBuiltinAgdaTCMIsMacroBuiltinAgdaTCMWithNormalisationBuiltinAgdaTCMWithReconstructedBuiltinAgdaTCMWithExpandLastBuiltinAgdaTCMWithReduceDefsBuiltinAgdaTCMAskNormalisationBuiltinAgdaTCMAskReconstructedBuiltinAgdaTCMAskExpandLastBuiltinAgdaTCMAskReduceDefsBuiltinAgdaTCMFormatErrorPartsBuiltinAgdaTCMDebugPrintBuiltinAgdaTCMNoConstraintsBuiltinAgdaTCMWorkOnTypesBuiltinAgdaTCMRunSpeculativeBuiltinAgdaTCMExecBuiltinAgdaTCMGetInstancesBuiltinAgdaTCMSolveInstancesBuiltinAgdaTCMPragmaForeignBuiltinAgdaTCMPragmaCompileBuiltinAgdaBlockerBuiltinAgdaBlockerAnyBuiltinAgdaBlockerAllBuiltinAgdaBlockerMeta
Instances13Bounded, Enum, Eq, Ord, Show, Generic, …
datadata PrimitiveId
#

A primitive name, defined by the primitive block.

PrimConIdPrimIdElimPrimIMinPrimIMaxPrimINegPrimPartialPrimPartialPPrimSubOutPrimGluePrim_gluePrim_ungluePrim_glueUPrim_unglueUPrimFaceForallPrimCompPrimPOrPrimTransPrimDepIMinPrimIdFacePrimIdPathPrimHCompPrimShowIntegerPrimNatPlusPrimNatMinusPrimNatTimesPrimNatDivSucAuxPrimNatModSucAuxPrimNatEqualityPrimNatLessPrimShowNatPrimWord64FromNatPrimWord64ToNatPrimWord64ToNatInjectivePrimLevelZeroPrimLevelSucPrimLevelMaxPrimFloatEqualityPrimFloatInequalityPrimFloatLessPrimFloatIsInfinitePrimFloatIsNaNPrimFloatIsNegativeZeroPrimFloatIsSafeIntegerPrimFloatToWord64PrimFloatToWord64InjectivePrimNatToFloatPrimIntToFloatPrimFloatRoundPrimFloatFloorPrimFloatCeilingPrimFloatToRatioPrimRatioToFloatPrimFloatDecodePrimFloatEncodePrimShowFloatPrimFloatPlusPrimFloatMinusPrimFloatTimesPrimFloatNegatePrimFloatDivPrimFloatPowPrimFloatSqrtPrimFloatExpPrimFloatLogPrimFloatSinPrimFloatCosPrimFloatTanPrimFloatASinPrimFloatACosPrimFloatATanPrimFloatATan2PrimFloatSinhPrimFloatCoshPrimFloatTanhPrimFloatASinhPrimFloatACoshPrimFloatATanhPrimCharEqualityPrimIsLowerPrimIsDigitPrimIsAlphaPrimIsSpacePrimIsAsciiPrimIsLatin1PrimIsPrintPrimIsHexDigitPrimToUpperPrimToLowerPrimCharToNatPrimCharToNatInjectivePrimNatToCharPrimShowCharPrimStringToListPrimStringToListInjectivePrimStringFromListPrimStringFromListInjectivePrimStringAppendPrimStringEqualityPrimShowStringPrimStringUnconsPrimErasePrimEraseEqualityPrimForcePrimForceLemmaPrimQNameEqualityPrimQNameLessPrimShowQNamePrimQNameFixityPrimQNameToWord64sPrimQNameToWord64sInjectivePrimMetaEqualityPrimMetaLessPrimShowMetaPrimMetaToNatPrimMetaToNatInjectivePrimLockUniv
Instances14Bounded, Enum, Eq, Ord, Show, Generic, …
typetype Verbosity = Maybe (Trie VerboseKeyItem VerboseLevel)
#

Nothing is used if no verbosity options have been given, thus making it possible to handle the default case relatively quickly. Note that Nothing corresponds to a trie with verbosity level 1 for the empty path.

valuecheckForImportCycle :: TCM ()
#

Assumes that the first module in the import path is the module we are worried about.

valuegetOpen :: (TermSubst a, MonadTCEnv m) => Open a -> m a
#

Extract the value from an open term. The checkpoint at which it was created must be in scope.

valuetryGetOpen
  1. :: (TermSubst a, ReadTCState m, MonadTCEnv m)
  2. => Substitution -> a -> Maybe a
  3. -> Open a
  4. -> m (Maybe a)
#

Extract the value from an open term. If the checkpoint is no longer in scope use the provided function to pull the object to the most recent common checkpoint. The function is given the substitution from the common ancestor to the checkpoint of the thing.

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

Methods

Instances16MonadAddContext, …
classclass (Applicative m, MonadTCEnv m, ReadTCState m, HasOptions m) => MonadReduce (m :: Type -> Type) where
#

Methods

Instances17MonadReduce, …
valueresetState :: TCM ()
#

Resets the non-persistent part of the type checking state.

classclass ReadTCState m => MonadStatistics (m :: Type -> Type) where
#

Methods

Instances8MonadStatistics, …
datadata CompilerPragma
#

The backends are responsible for parsing their own pragmas.

Instances8Eq, Show, Generic, NFData, HasRange, KillRange, …
datadata TCEnv
#

Constructors

Instances6Generic, NFData, LensTCEnv, LensIsAbstract, LensIsOpaque, Rep
datadata Interface
#

Constructors

Instances7Show, Generic, NFData, Pretty, InstantiateFull, EmbPrj, …
classclass ReportS a where
#

Debug print some lines if the verbosity level for the given VerboseKey is at least VerboseLevel.

Note: In the presence of OverloadedStrings, just @ reportS key level "Literate string" gives an Ambiguous type variable error in GHC@. Use the legacy functions reportSLn and reportSDoc instead then.

Methods

Instances6ReportS
  • ReportS DocDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • ReportS StringDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • ReportS (TCM Doc)Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • ReportS [Doc]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • ReportS [TCM Doc]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • ReportS [String]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
datadata TCState
#

Constructors

Instances10Show, Generic, NFData, LensCommandLineOptions, LensIncludePaths, LensPersistentVerbosity, …
classclass (MonadTCEnv m, ReadTCState m) => MonadInteractionPoints (m :: Type -> Type) where
#
Instances6MonadInteractionPoints
Instances16PureTCM, …
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.

datadata PrimFun
#
Instances6Generic, NFData, NamesIn, Abstract, Apply, Rep
datadata RunMetaOccursCheck
#
Instances6Eq, Ord, Show, Generic, NFData, Rep
datadata CompareAs
#

We can either compare two terms at a given type, or compare two types without knowing (or caring about) their sorts.

Constructors

Instances19Show, Generic, NFData, Pretty, IsSizeType, Subst, …
datadata MetaVariable
#

Information about local meta-variables.

Constructors

Instances9Generic, NFData, HasRange, SetRange, LensModality, LensQuantity, …

Monad service class for creating, solving and eta-expanding of metavariables.

Methods

Instances3MonadMetaSolver
datadata InstanceInfo
#

Information about an instance definition.

Constructors

Instances6Show, Generic, NFData, KillRange, EmbPrj, Rep
classclass Monad m => MonadBlock (m :: Type -> Type) where
#

Methods

  • patternViolation :: Blocker -> m a

    `patternViolation b` aborts the current computation

  • catchPatternErr :: (Blocker -> m a) -> m a -> m a

    `catchPatternErr handle m` runs m, handling pattern violations with handle (doesn't roll back the state)

Instances7MonadBlock, …
datadata ProblemConstraint
#
Instances12Show, Generic, NFData, HasRange, PrettyTCM, Reify, …
datadata NLPat
#

Non-linear (non-constructor) first-order pattern.

Constructors

Instances31Show, Generic, NFData, DeBruijn, Subst, KillRange, …
classclass Monad m => MonadFresh i (m :: Type -> Type) where
#

Methods

Instances9MonadFresh, …
datadata LetBinding
#
Instances7Show, Generic, NFData, Subst, InstantiateFull, Rep, …
newtypenewtype Section
#
Instances9Eq, Show, NFData, Pretty, KillRange, NamesIn, …
  • Eq SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Substitute · orphan
  • Show SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • NFData SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • Pretty SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • KillRange SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • KillRange SectionsDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • NamesIn SectionDefined in Agda-2.7.0.1 · Agda.Syntax.Internal.Names
  • InstantiateFull SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Reduce
  • EmbPrj SectionDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Internal · orphan
datadata PreScopeState
#

Constructors

Instances3Generic, NFData, Rep
datadata PostScopeState
#

Constructors

Instances3Generic, NFData, Rep
datadata PersistentTCState
#

A part of the state which is not reverted when an error is thrown or the state is reset.

Constructors

Instances7Generic, NFData, LensCommandLineOptions, LensIncludePaths, LensPersistentVerbosity, LensSafeMode, …
datadata DisambiguatedName
#

Name disambiguation for the sake of highlighting.

Instances4Generic, NFData, Hilite, Rep
newtypenewtype CheckpointId
#

Constructors

Instances12Enum, Eq, Integral, Num, Ord, Real, …
newtypenewtype ForeignCodeStack
#

Foreign code fragments are stored in reversed order to support efficient appending: head points to the latest pragma in module.

Instances5Show, Generic, NFData, EmbPrj, Rep
newtypenewtype MutualId
#

Constructors

Instances9Enum, Eq, Num, Ord, Show, NFData, …
  • Enum MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • Eq MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • Num MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • Ord MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • Show MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • NFData MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • HasFresh MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • KillRange MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • EmbPrj MutualIdDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Internal · orphan
datadata MutualBlock
#

A mutual block of names in the signature.

Constructors

Instances6Eq, Show, Generic, NFData, Null, Rep
datadata OpaqueBlock
#

A block of opaque definitions.

Constructors

Instances8Eq, Show, Generic, NFData, Hashable, Pretty, …
datadata LoadedFileCache
#
Instances3Generic, NFData, Rep

When typechecking something of the following form:

instance x : _ x = y

it's not yet known where to add x, so we add it to a list of unresolved instances and we'll deal with it later.

classclass Enum i => HasFresh i where
#

Methods

Instances8HasFresh, …
classclass Monad m => MonadStConcreteNames (m :: Type -> Type) where
#

A monad that has read and write access to the stConcreteNames part of the TCState. Basically, this is a synonym for `MonadState ConcreteNames m` (which cannot be used directly because of the limitations of Haskell's typeclass system).

Instances6MonadStConcreteNames
datadata ModuleCheckMode
#

Distinguishes between type-checked and scope-checked interfaces when stored in the map of VisitedModules.

Instances8Bounded, Enum, Eq, Ord, Show, Generic, …
datadata ForeignCode
#
Instances5Show, Generic, NFData, EmbPrj, Rep
datadata WhyCheckModality
#

Why are we performing a modality check?

Constructors

  • ConstructorType

    Because --without-K is enabled, so the types of data constructors must be usable at the context's modality.

  • IndexedClause

    Because --without-K is enabled, so the result type of clauses must be usable at the context's modality.

  • IndexedClauseArg Name Name

    Because --without-K is enabled, so any argument (second name) which mentions a dotted argument (first name) must have a type which is usable at the context's modality.

  • GeneratedClause

    Because we double-check the --cubical-compatible clauses. This is an internal error!

Instances4Show, Generic, NFData, Rep
datadata IsForced
#

Information about whether an argument is forced by the type of a function.

Instances9Eq, Show, Generic, NFData, PrettyTCM, KillRange, …
datadata Candidate
#

A candidate solution for an instance meta is a term with its type. It may be the case that the candidate is not fully applied yet or of the wrong type, hence the need for the type.

Instances16Eq, Ord, Show, Generic, NFData, Subst, …
datadata Judgement a
#

Parametrized since it is used without MetaId when creating a new meta.

Constructors

Instances8Show, Generic, NFData, Pretty, PrettyTCM, InstantiateFull, …
datadata DoGeneralize
#

Constructors

  • YesGeneralizeVar

    Generalize because it is a generalizable variable.

  • YesGeneralizeMeta

    Generalize because it is a metavariable and we're currently checking the type of a generalizable variable (this should get the default modality).

  • NoGeneralize

    Don't generalize.

Instances8Eq, Ord, Show, Generic, NFData, KillRange, …
datadata GeneralizedValue
#

The value of a generalizable variable. This is created to be a generalizable meta before checking the type to be generalized.

Instances4Show, Generic, NFData, Rep
newtypenewtype MetaPriority
#

Meta variable priority: When we have an equation between meta-variables, which one should be instantiated?

Higher value means higher priority to be instantiated.

Constructors

Instances4Eq, Ord, Show, NFData
datadata MetaInstantiation
#

Solution status of meta.

Constructors

Instances4Generic, NFData, Pretty, Rep
datadata Listener
#
Instances5Eq, Ord, Generic, NFData, Rep
datadata Frozen
#

Frozen meta variable cannot be instantiated by unification. This serves to prevent the completion of a definition by its use outside of the current block. (See issues 118, 288, 399).

Constructors

Instances5Eq, Show, Generic, NFData, Rep
datadata Instantiation
#

Meta-variable instantiations.

Constructors

Instances6Show, Generic, NFData, InstantiateFull, EmbPrj, Rep
datadata TypeCheckingProblem
#

Constructors

Instances4Generic, NFData, PrettyTCM, Rep
datadata RemoteMetaVariable
#

Information about remote meta-variables.

Remote meta-variables are meta-variables originating in other modules. These meta-variables are always instantiated. We do not retain all the information about a local meta-variable when creating an interface:

  • The mvPriority field is not needed, because the meta-variable cannot be instantiated.

  • The mvFrozen field is not needed, because there is no point in freezing instantiated meta-variables.

  • The mvListeners field is not needed, because no meta-variable should be listening to this one.

  • The mvTwin field is not needed, because the meta-variable has already been instantiated.

  • The mvPermutation is currently removed, but could be retained if it turns out to be useful for something.

  • The only part of the mvInfo field that is kept is the miModality field. The miMetaOccursCheck and miGeneralizable fields are omitted, because the meta-variable has already been instantiated. The Range that is part of the miClosRange field and the miNameSuggestion field are omitted because instantiated meta-variables are typically not presented to users. Finally the Closure part of the miClosRange field is omitted because it can be large (at least if we ignore potential sharing).

Instances9Show, Generic, NFData, LensModality, LensQuantity, LensRelevance, …

Constructors

Instances3Generic, NFData, Rep
datadata ExpandHidden
#

Constructors

  • ExpandLast

    Add implicit arguments in the end until type is no longer hidden Pi.

  • DontExpandLast

    Do not append implicit arguments.

  • ReallyDontExpandLast

    Makes doExpandLast have no effect. Used to avoid implicit insertion of arguments to metavariables.

Instances4Eq, Generic, NFData, Rep
datadata ArgsCheckState a
#

Constructors

Instances1Show
datadata InteractionPoint
#

Interaction points are created by the scope checker who sets the range. The meta variable is created by the type checker and then hooked up to the interaction point.

Constructors

Instances7Eq, Generic, NFData, HasTag, Rep, Tag, …
datadata IPClause
#

Which clause is an interaction point located in?

Constructors

Instances4Eq, Generic, NFData, Rep
newtypenewtype IPBoundary' t
#
Instances16Functor, Foldable, Traversable, Show, Generic, NFData, …
datadata Overapplied
#

Flag to indicate whether the meta is overapplied in the constraint. A meta is overapplied if it has more arguments than the size of the telescope in its creation environment (as stored in MetaInfo).

Instances5Eq, Show, Generic, NFData, Rep
datadata InstanceTable
#

Records information about the instances in the signature. Does not deal with local instances.

Constructors

  • InstanceTable
    • _itableTree :: DiscrimTree QName

      The actual discrimination tree for looking up instances with

    • _itableCounts :: Map QName Int

      For profiling, we store the number of instances on a per-class basis. This lets us compare the result from the discrimination tree with all the instances in scope, thus informing us how many validity checks were skipped.

Instances8Show, Generic, Semigroup, Monoid, NFData, KillRange, …
datadata DisplayTerm
#

A structured presentation of a Term for reification into Abstract.Syntax.

Constructors

Instances19Show, Generic, NFData, Pretty, Subst, Reify, …
datadata NLPType
#
Instances19Show, Generic, NFData, Subst, PrettyTCM, KillRange, …
datadata NLPSort
#
Instances19Show, Generic, NFData, Subst, PrettyTCM, KillRange, …
datadata RewriteRule
#

Rewrite rules can be added independently from function clauses.

Constructors

Instances15Show, Generic, NFData, Subst, PrettyTCM, KillRange, …
datadata Defn
#

Constructors

Instances12Show, Generic, NFData, Pretty, KillRange, NamesIn, …
datadata NumGeneralizableArgs
#

Constructors

Instances6Show, NFData, KillRange, Abstract, Apply, EmbPrj
datadata ExtLamInfo
#

Additional information for extended lambdas.

Constructors

  • ExtLamInfo
    • extLamModule :: ModuleName

      For complicated reasons the scope checker decides the QName of a pattern lambda, and thus its module. We really need to decide the module during type checking though, since if the lambda appears in a refined context the module picked by the scope checker has very much the wrong parameters.

    • extLamAbsurd :: Bool

      Was this definition created from an absurd lambda λ ()?

    • extLamSys :: !Maybe System
Instances9Show, Generic, NFData, KillRange, NamesIn, InstantiateFull, …
datadata Projection
#

Additional information for projection Functions.

Constructors

  • Projection
    • projProper :: Maybe QName

      Nothing if only projection-like, Just r if record projection. The r is the name of the record type projected from. This field is updated by module application.

    • projOrig :: QName

      The original projection name (current name could be from module application).

    • projFromType :: Arg QName

      Type projected from. Original record type if projProper = Just{}. Also stores ArgInfo of the principal argument. This field is unchanged by module application.

    • projIndex :: Int

      Index of the record argument. Start counting with 1, because 0 means that it is already applied to the record value. This can happen in module instantiation, but then either the record value is var 0, or funProjection == Left _.

    • projLams :: ProjLams

      Term t to be be applied to record parameters and record value. The parameters will be dropped. In case of a proper projection, a postfix projection application will be created: t = pars r -> r .p (Invariant: the number of abstractions equals projIndex.) In case of a projection-like function, just the function symbol is returned as Def: t = pars -> f.

Instances9Show, Generic, NFData, Pretty, KillRange, Abstract, …
newtypenewtype ProjLams
#

Abstractions to build projection function (dropping parameters).

Instances10Show, Generic, NFData, Pretty, Null, KillRange, …
datadata EtaEquality
#

Should a record type admit eta-equality?

Constructors

Instances9Eq, Show, Generic, NFData, KillRange, CopatternMatchingAllowed, …
datadata FunctionFlag
#

Constructors

  • FunStatic

    Should calls to this function be normalised at compile-time?

  • FunInline

    Should calls to this function be inlined by the compiler?

  • FunMacro

    Is this function a macro?

  • FunFirstOrder

    Is this function INJECTIVE_FOR_INFERENCE? Indicates whether the first-order shortcut should be applied to the definition.

  • FunErasure

    Was --erasure in effect when the function was defined? (This can affect the type of a projection.)

  • FunAbstract

    Is the function abstract?

  • FunProj

    Is this function a descendant of a field (typically, a projection)?

Instances13Bounded, Enum, Eq, Ord, Show, Ix, …
datadata CompKit
#
Instances9Eq, Ord, Show, Generic, NFData, KillRange, …
datadata AxiomData
#

Constructors

Instances4Show, Generic, NFData, Rep
datadata DataOrRecSigData
#
Instances5Show, Generic, NFData, Pretty, Rep
datadata FunctionData
#

Constructors

Instances5Show, Generic, NFData, Pretty, Rep
datadata DatatypeData
#

Constructors

Instances5Show, Generic, NFData, Pretty, Rep
datadata RecordData
#

Constructors

Instances5Show, Generic, NFData, Pretty, Rep
datadata ConstructorData
#

Constructors

  • ConstructorData
    • _conPars :: Int

      Number of parameters.

    • _conArity :: Int

      Number of arguments (excluding parameters).

    • _conSrcCon :: ConHead

      Name of (original) constructor and fields. (This might be in a module instance.)

    • _conData :: QName

      Name of datatype or record type.

    • _conAbstr :: IsAbstract
    • _conComp :: CompKit

      Cubical composition.

    • _conProj :: Maybe [QName]

      Projections. Nothing if not yet computed.

    • _conForced :: [IsForced]

      Which arguments are forced (i.e. determined by the type of the constructor)? Either this list is empty (if the forcing analysis isn't run), or its length is conArity.

    • _conErased :: Maybe [Bool]

      Which arguments are erased at runtime (computed during compilation to treeless)? True means erased, False means retained. Nothing if no erasure analysis has been performed yet. The length of the list is conArity.

    • _conErasure :: !Bool

      Was --erasure in effect when the constructor was defined? (This can affect the constructor's type.)

    • _conInline :: !Bool

      Shall we translate the constructor on the root of the rhs into copattern matching on the lhs? Activated by INLINE pragma.

Instances5Show, Generic, NFData, Pretty, Rep
datadata PrimitiveData
#

Constructors

Instances5Show, Generic, NFData, Pretty, Rep
datadata PrimitiveSortData
#
Instances5Show, Generic, NFData, Pretty, Rep

Indicates the reason behind a function having not been marked projection-like.

Constructors

  • MaybeProjection

    Projection-likeness analysis has not run on this function yet. It may do so in the future.

  • NeverProjection

    The user has requested that this function be not be marked projection-like. The analysis may already have run on this function, but the results have been discarded, and it will not be run again.

Instances9Bounded, Enum, Show, Generic, NFData, Pretty, …
datadata BuiltinSort
#
Instances7Eq, Show, Generic, NFData, KillRange, EmbPrj, …
datadata FunctionInverse' c
#
Instances13Functor, Abstract, DropArgs, InstantiateFull, Apply, Show, …
datadata Simplification
#

Did we encounter a simplifying reduction? In terms of CIC, that would be a iota-reduction. In terms of Agda, this is a constructor or literal pattern that matched. Just beta-reduction (substitution) or delta-reduction (unfolding of definitions) does not count as simplifying?

Instances8Eq, Show, Generic, Semigroup, Monoid, NFData, …
datadata AllowedReduction
#

Controlling reduce.

Constructors

Instances10Bounded, Enum, Eq, Ord, Show, Ix, …
datadata ReduceDefs
#
Instances3Generic, NFData, Rep
datadata TermHead
#
Instances9Eq, Ord, Show, Generic, NFData, Pretty, …
datadata AbstractMode
#

Constructors

Instances5Eq, Show, Generic, NFData, Rep
datadata UnquoteFlags
#
Instances3Generic, NFData, Rep
datadata CandidateKind
#
Instances6Eq, Ord, Show, Generic, NFData, Rep
datadata TerminationError
#

Information about a mutual block which did not pass the termination checker.

Constructors

Instances4Show, Generic, NFData, Rep
Instances5Show, Generic, NFData, EmbPrj, Rep
datadata CallInfo
#

Information about a call.

Constructors

Instances7Show, Generic, NFData, Pretty, HasRange, PrettyTCM, …
datadata ErasedDatatypeReason
#

The reason for an ErasedDatatype error.

Constructors

Instances4Show, Generic, NFData, Rep
datadata SplitError
#

Error when splitting a pattern variable into possible constructor patterns.

Constructors

Instances5Show, Generic, NFData, PrettyTCM, Rep
datadata UnificationFailure
#

Constructors

Instances5Show, Generic, NFData, PrettyTCM, Rep
datadata NegativeUnification
#
Instances5Show, Generic, NFData, PrettyTCM, Rep
datadata UnquoteError
#
Instances4Show, Generic, NFData, Rep
Instances4Show, Generic, NFData, Rep
Instances4Show, Generic, NFData, Rep
datadata InductionAndEta
#
Instances5Show, Generic, NFData, Rep
datadata ReduceEnv
#

Environment of the reduce monad.

Constructors

newtypenewtype BlockT (m :: Type -> Type) a
#

Constructors

Instances18MonadTrans, Monad, Functor, MonadFail, Applicative, MonadIO, …
valuefinally_ :: TCM a -> TCM b -> TCM a
#

Execute a finalizer even when an exception is thrown. Does not catch any errors. In case both the regular computation and the finalizer throw an exception, the one of the finalizer is propagated.

valueforkTCM :: TCM a -> TCM ()
#

Runs the given computation in a separate thread, with a copy of the current state and environment.

Note that Agda sometimes uses actual, mutable state. If the computation given to forkTCM tries to modify this state, then bad things can happen, because accesses are not mutually exclusive. The forkTCM function has been added mainly to allow the thread to read (a snapshot of) the current state in a convenient way.

Note also that exceptions which are raised in the thread are not propagated to the parent, so the thread should not do anything important.

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.

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

If the reduced did a proper match (constructor or literal pattern), then record this as simplification step.

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

Allow all reductions when reducing types. Otherwise only allow inlined functions to be unfolded.

valuecallByName :: TCM a -> TCM a
#

Don't use call-by-need evaluation for the given computation.

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

Don't fold let bindings when printing. This is a bit crude since it disables any folding of let bindings at all. In many cases it's better to use removeLetBinding before printing to drop the let bindings that should not be folded.

newtypenewtype BuiltinAccess a
#

The trivial implementation of HasBuiltins, using a constant TCState.

This may be used instead of TCMT/ReduceM where builtins must be accessed in a pure context.

Instances5Monad, Functor, MonadFail, Applicative, HasBuiltins
valuegetTerm :: (HasBuiltins m, IsBuiltin a) => String -> a -> m Term
#

getTerm use name looks up name as a primitive or builtin, and throws an error otherwise. The use argument describes how the name is used for the sake of the error message.

Compute a SortKit in contexts that do not support failure (e.g. Reify). This should only be used when we are sure that the primitive sorts have been bound, i.e. because it is "after" type checking.

valuepathView :: HasBuiltins m => Type -> m PathView
#

Check whether the type is actually an path (lhs ≡ rhs) and extract lhs, rhs, and their type.

Precondition: type is reduced.

Check whether the type is actually an equality (lhs ≡ rhs) and extract lhs, rhs, and their type.

Precondition: type is reduced.

classclass TraceS a where
#

Debug print some lines if the verbosity level for the given VerboseKey is at least VerboseLevel.

Note: In the presence of OverloadedStrings, just @ traceS key level "Literate string" gives an Ambiguous type variable error in GHC@. Use the legacy functions traceSLn and traceSDoc instead then.

Methods

Instances6TraceS
  • TraceS DocDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • TraceS StringDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • TraceS (TCM Doc)Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • TraceS [Doc]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • TraceS [TCM Doc]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
  • TraceS [String]Defined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Debug
valuefreshTCM :: TCM a -> TCM (Either TCErr a)
#

A fresh TCM instance.

The computation is run in a fresh state, with the exception that the persistent state is preserved. If the computation changes the state, then these changes are ignored, except for changes to the persistent state. (Changes to the persistent state are also ignored if errors other than type errors or IO exceptions are encountered.)

valuelocalScope :: TCM a -> TCM a
#

Discard any changes to the scope by a computation.

Update a possibly imported definition. Warning: changes made to imported definitions (during type checking) will not persist outside the current module. This function is currently used to update the compiled representation of a function during compilation.

datadata BoundedSize
#

Result of querying whether size variable i is bounded by another size.

Constructors

Instances2Eq, Show
  • Eq BoundedSizeDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.SizedTypes
  • Show BoundedSizeDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.SizedTypes
classclass IsSizeType a where
#

Check if a type is the primSize type. The argument should be reduced.

Methods

Instances5IsSizeType
valuehaveSizedTypes :: TCM Bool
#

Test whether OPTIONS --sized-types and whether the size built-ins are defined.

valuesizeSort :: Sort
#

The sort of built-in types SIZE and SIZELT.

valuesizeUniv :: Type
#

The type of built-in types SIZE and SIZELT.

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.

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.

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.

valueinMutualBlock :: (MutualId -> TCM a) -> TCM a
#

Pass the current mutual block id or create a new mutual block if we are not already inside on.

valueworkOnTypes' :: MonadTCEnv m => Bool -> m a -> m a
#

Internal workhorse, expects value of --experimental-irrelevance flag as argument.

valueapplyRelevanceToContext
  1. :: (MonadTCEnv tcm, LensRelevance r)
  2. => r
  3. -> tcm a
  4. -> tcm a
#

(Conditionally) wake up irrelevant variables and make them relevant. For instance, in an irrelevant function argument otherwise irrelevant variables may be used, so they are awoken before type checking the argument.

Also allow the use of irrelevant definitions.

valueapplyRelevanceToContextOnly :: MonadTCEnv tcm => Relevance -> tcm a -> tcm a
#

(Conditionally) wake up irrelevant variables and make them relevant. For instance, in an irrelevant function argument otherwise irrelevant variables may be used, so they are awoken before type checking the argument.

Precondition: Relevance /= Relevant

valueapplyRelevanceToJudgementOnly
  1. :: MonadTCEnv tcm
  2. => Relevance
  3. -> tcm a
  4. -> tcm a
#

Apply relevance rel the the relevance annotation of the (typing/equality) judgement. This is part of the work done when going into a rel-context.

Precondition: Relevance /= Relevant

valueapplyModalityToContext
  1. :: (MonadTCEnv tcm, LensModality m)
  2. => m
  3. -> tcm a
  4. -> tcm a
#

(Conditionally) wake up irrelevant variables and make them relevant. For instance, in an irrelevant function argument otherwise irrelevant variables may be used, so they are awoken before type checking the argument.

Also allow the use of irrelevant definitions.

This function might also do something for other modalities.

valueapplyModalityToContextOnly :: MonadTCEnv tcm => Modality -> tcm a -> tcm a
#

(Conditionally) wake up irrelevant variables and make them relevant. For instance, in an irrelevant function argument otherwise irrelevant variables may be used, so they are awoken before type checking the argument.

This function might also do something for other modalities, but not for quantities.

Precondition: Modality /= Relevant

valuewakeIrrelevantVars :: MonadTCEnv tcm => tcm a -> tcm a
#

Wake up irrelevant variables and make them relevant. This is used when type checking terms in a hole, in which case you want to be able to (for instance) infer the type of an irrelevant variable. In the course of type checking an irrelevant function argument applyRelevanceToContext is used instead, which also sets the context relevance to Irrelevant. This is not the right thing to do when type checking interactively in a hole since it also marks all metas created during type checking as irrelevant (issue #2568).

Also set the current quantity to 0.

A problem is considered solved if there are no unsolved blocking constraints belonging to it. There's no really good principle for what constraints are blocking and which are not, but the general idea is that nothing bad should happen if you assume a non-blocking constraint is solvable, but it turns out it isn't. For instance, assuming an equality constraint between two types that turns out to be false can lead to ill typed terms in places where we don't expect them.

valuesetIncludeDirs
  1. :: [FilePath]

    New include directories.

  2. -> AbsolutePath

    The base directory of relative paths.

  3. -> TCM ()
#

Makes the given directories absolute and stores them as include directories.

If the include directories change, then the state is reset (completely, except for the include directories and some other things).

An empty list is interpreted as ["."].

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

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 Θ]

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

classclass IsInstantiatedMeta a where
#

Check whether all metas are instantiated. Precondition: argument is a meta (in some form) or a list of metas.

Methods

Instances8IsInstantiatedMeta, …

Returns all metavariables in a constraint. Slightly complicated by the fact that blocked terms are represented by two meta variables. To find the second one we need to look up the meta listeners for the one in the UnBlock constraint. This is used for the purpose of deciding if a metavariable is constrained or if it can be generalized over (see Agda.TypeChecking.Generalize).

classclass UnFreezeMeta a where
#

Unfreeze a meta and its type if this is a meta again. Does not unfreeze deep occurrences of meta-variables or remote meta-variables.

Methods

Instances8UnFreezeMeta, …
datadata CheckResult
#

The result and associated parameters of a type-checked file, when invoked directly via interaction or a backend. Note that the constructor is not exported.