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.Rules.LHS.Problem

  • 12 types
  • 1 class
  • 11 values
  • PackageAgda-2.7.0.1
  • Exports24
  • LanguageHaskell2010
  • LicenceMIT
  • SourceProblem.hs
datadata FlexibleVarKind
#

When we encounter a flexible variable in the unifier, where did it come from? The alternatives are ordered such that we will assign the higher one first, i.e., first we try to assign a DotFlex, then...

Constructors

Instances3Eq, Show, ChooseFlex
datadata FlexibleVar a
#

Flexible variables are equipped with information where they come from, in order to make a choice which one to assign when two flexibles are unified.

Instances10Functor, Foldable, Traversable, Eq, Show, LensHiding, …
classclass ChooseFlex a where
#

Methods

Instances9ChooseFlex, …
datadata ProblemEq
#

A user pattern together with an internal term that it should be equal to after splitting is complete. Special cases: * User pattern is a variable but internal term isn't: this will be turned into an as pattern. * User pattern is a dot pattern: this pattern won't trigger any splitting but will be checked for equality after all splitting is complete and as patterns have been bound. * User pattern is an absurd pattern: emptiness of the type will be checked after splitting is complete. * User pattern is an annotated wildcard: type annotation will be checked after splitting is complete.

Instances11Eq, Show, Generic, NFData, Subst, PrettyTCM, …
datadata Problem a
#

The user patterns we still have to split on.

Constructors

  • Problem
    • _problemEqs :: [ProblemEq]

      User patterns which are typed (including the ones generated from implicit arguments).

    • _problemRestPats :: [NamedArg Pattern]

      List of user patterns which could not yet be typed. Example: f : (b : Bool) -> if b then Nat else Nat -> Nat f true = zero f false zero = zero f false (suc n) = n In this sitation, for clause 2, we construct an initial problem problemEqs = [false = b] problemRestPats = [zero] As we instantiate b to false, the targetType reduces to Nat -> Nat and we can move pattern zero over to problemEqs.

    • _problemCont :: LHSState a -> TCM a

      The code that checks the RHS.

Instances3Show, Subst, SubstArg
  • Show (Problem a)Defined in Agda-2.7.0.1 · Agda.TypeChecking.Rules.LHS.Problem
  • Subst (Problem a)Defined in Agda-2.7.0.1 · Agda.TypeChecking.Rules.LHS.Problem
  • type SubstArg (Problem a) = TermDefined in Agda-2.7.0.1 · Agda.TypeChecking.Rules.LHS.Problem
datadata AsBinding
#

Constructors

Instances5Pretty, Subst, PrettyTCM, InstantiateFull, SubstArg
datadata LHSState a
#

State worked on during the main loop of checking a lhs. [Ulf Norell's PhD, page. 35]

Constructors

Instances1PrettyTCM
datadata LeftoverPatterns
#
Instances4Semigroup, Monoid, PrettyTCM, Null

Classify remaining patterns after splitting is complete into pattern variables, as patterns, dot patterns, and absurd patterns. Precondition: there are no more constructor patterns.

valuegetUserVariableNames
  1. :: Telescope

    The telescope of pattern variables

  2. -> IntMap [(Name, PatVarPosition)]

    The list of user names for each pattern variable

  3. -> ([Maybe Name], [AsBinding])
#

Build a renaming for the internal patterns using variable names from the user patterns. If there are multiple user names for the same internal variable, the unused ones are returned as as-bindings. Names that are not also module parameters are preferred over those that are.

Orphan instances

1 instance