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

  • PackageAgda-2.7.0.1
  • Exports30
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSizedTypes.hs

SIZELT stuff

8 declarations
valuecheckSizeLtSat :: Term -> TCM ()
#

Check whether a type is either not a SIZELT or a SIZELT that is non-empty.

Checks that a size variable is ensured to be > 0. E.g. variable i cannot be zero in context (i : Size) (j : Size< ↑ ↑ i) (k : Size< j) (k' : Size< k). Throws a patternViolation if undecided.

valueisBounded :: PureTCM m => Nat -> m BoundedSize
#

Check whether a variable in the context is bounded by a size expression. If x : Size< a, then a is returned.

trySizeUniv cmp t m n x els1 y els2 is called as a last resort when conversion checking m cmp n : t failed for definitions m = x els1 and n = y els2, where the heads x and y are not equal.

trySizeUniv accounts for subtyping between SIZELT and SIZE, like Size< i =< Size.

If it does not succeed it reports failure of conversion check.

Size views that reduce.

2 declarations

Size comparison that might add constraints.

6 declarations

Size constraints.

7 declarations

Size constraint solving.

7 declarations

Convert size constraint into form where each meta is applied to indices 0,1,..,n-1 where n is the arity of that meta.

X[σ] <= t becomes X[id] <= t[σ^-1]

X[σ] ≤ Y[τ] becomes X[id] ≤ Y[τ[σ^-1]] or X[σ[τ^1]] ≤ Y[id] whichever is defined. If none is defined, we give up.