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

Functions for inserting implicit arguments at the right places.

  • 1 type
  • 8 values
  • PackageAgda-2.7.0.1
  • Exports10
  • LanguageHaskell2010
  • LicenceMIT
  • SourceImplicit.hs
valueimplicitArgs
  1. :: (PureTCM m, MonadMetaSolver m, MonadTCM m)
  2. => Int

    n, the maximum number of implicts to be inserted.

  3. -> (Hiding -> Bool)

    expand, the predicate to test whether we should keep inserting.

  4. -> Type

    The (function) type t we are eliminating.

  5. -> m (Args, Type)

    The eliminating arguments and the remaining type.

#

implicitArgs n expand t generates up to n implicit argument metas (unbounded if n<0), as long as t is a function type and expand holds on the hiding info of its domain.

valueimplicitNamedArgs
  1. :: (PureTCM m, MonadMetaSolver m, MonadTCM m)
  2. => Int

    n, the maximum number of implicts to be inserted.

  3. -> (Hiding -> ArgName -> Bool)

    expand, the predicate to test whether we should keep inserting.

  4. -> Type

    The (function) type t we are eliminating.

  5. -> m (NamedArgs, Type)

    The eliminating arguments and the remaining type.

#

implicitNamedArgs n expand t generates up to n named implicit arguments metas (unbounded if n<0), as long as t is a function type and expand holds on the hiding and name info of its domain.

valueinsertImplicit
  1. :: NamedArg e

    Next given argument a.

  2. -> [Dom a]

    Expected arguments ts.

  3. -> ImplicitInsertion
#

If the next given argument is a and the expected arguments are ts insertImplicit' a ts returns the prefix of ts that precedes a.

If a is named but this name does not appear in ts, the NoSuchName exception is thrown.

valueinsertImplicit'
  1. :: NamedArg e

    Next given argument a.

  2. -> [Dom ArgName]

    Expected arguments ts.

  3. -> ImplicitInsertion
#

If the next given argument is a and the expected arguments are ts insertImplicit' a ts returns the prefix of ts that precedes a.

If a is named but this name does not appear in ts, the NoSuchName exception is thrown.