| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.Syntax.Internal.Defs
Description
Extract used definitions from terms.
Documentation
getDefListNoMetas :: Term -> [QName] Source #
Get list of definitions, throw an error if any metavariable is encountered.
class GetDefs a where Source #
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
getDefs :: (Monoid m, ExpandCase m) => (MetaId -> Maybe Term) -> (QName -> m) -> a -> m Source #
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 Endo [QName] or Set QName. Do not use [QName]
because of obvious quadratic slowdown.
Note that emb can also choose to discard a used definition
by mapping to the unit of the monoid.
Instances
| GetDefs MetaId Source # | |
| GetDefs Clause Source # | |
| GetDefs Level Source # | |
| GetDefs PlusLevel Source # | |
| GetDefs Sort Source # | |
| GetDefs Telescope Source # | |
| GetDefs Term Source # | |
| GetDefs Type Source # | |
| GetDefs String Source # | |
| GetDefs a => GetDefs (Arg a) Source # | |
| GetDefs a => GetDefs (Abs a) Source # | |
| GetDefs a => GetDefs (Dom a) Source # | |
| GetDefs a => GetDefs (Elim' a) Source # | |
| GetDefs a => GetDefs (Maybe a) Source # | |
| GetDefs a => GetDefs [a] Source # | |
Defined in Agda.Syntax.Internal.Defs | |
| (GetDefs a, GetDefs b) => GetDefs (a, b) Source # | |
Defined in Agda.Syntax.Internal.Defs | |