HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Syntax.Internal.Defs

Extract used definitions from terms.

  • 2 types
  • 2 classes
  • 1 value
  • PackageAgda-2.7.0.1
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceDefs.hs
valuegetDefs'
  1. :: (GetDefs a, Monoid b)
  2. => MetaId -> Maybe Term
  3. -> QName -> b
  4. -> a
  5. -> b
#

getDefs' lookup emb a extracts all used definitions (functions, data/record types) from a, embedded into a monoid via emb. Instantiations of meta variables are obtained via lookup.

Typical monoid instances would be [QName] or Set QName. Note that emb can also choose to discard a used definition by mapping to the unit of the monoid.

classclass GetDefs a where
#

Getting the used definitions.

Note: in contrast to foldTerm getDefs also collects from sorts in terms. Thus, this is not an instance of foldTerm.

Methods

Instances16GetDefs, …