HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

ModuleAgda-2.8.0.2Haskell2010

Agda.TypeChecking.Implicit

Functions for inserting implicit arguments at the right places.

  • 1 type
  • 7 values
  • PackageAgda-2.8.0.2
  • Exports9
  • 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.