- builtinSizeHook :: String -> QName -> Term -> Type -> TCM ()
- deepSizeView :: Term -> TCM DeepSizeView
- sizeMaxView :: Term -> TCM SizeMaxView
- trySizeUniv :: Comparison -> Type -> Term -> Term -> QName -> [Elim] -> QName -> [Elim] -> TCM ()
- compareSizes :: Comparison -> Term -> Term -> TCM ()
- compareMaxViews :: Comparison -> SizeMaxView -> SizeMaxView -> TCM ()
- compareBelowMax :: DeepSizeView -> SizeMaxView -> TCM ()
- compareSizeViews :: Comparison -> DeepSizeView -> DeepSizeView -> TCM ()
- isBounded :: Nat -> TCM BoundedSize
- trivial :: Term -> Term -> TCM Bool
- boundedSizeMetaHook :: Term -> Telescope -> Type -> TCM ()
- isSizeProblem :: ProblemId -> TCM Bool
- isSizeConstraint :: Closure Constraint -> TCM Bool
- getSizeConstraints :: TCM [Closure Constraint]
- getSizeMetas :: TCM [(MetaId, Int)]
- data SizeExpr
- data SizeConstraint = Leq SizeExpr Int SizeExpr
- computeSizeConstraints :: [Closure Constraint] -> TCM [SizeConstraint]
- computeSizeConstraint :: Constraint -> TCM (Maybe SizeConstraint)
- sizeExpr :: Term -> TCM (SizeExpr, Int)
- flexibleVariables :: SizeConstraint -> [(MetaId, [Int])]
- haveSizedTypes :: TCM Bool
- canonicalizeSizeConstraint :: SizeConstraint -> Maybe SizeConstraint
- solveSizeConstraints :: TCM ()
Compute the deep size view of a term. Precondition: sized types are enabled.
Account for subtyping
Size< i =< Size
m = x els1,
n = y els2,
n are not equal.
Compare two sizes. Only with --sized-types.
compareBelowMax u vs checks
u max vs@. Precondition: @size vs= 2
Whenever we create a bounded size meta, add a constraint
expressing the bound.
boundedSizeMetaHook v tel a,
tel includes the current context.
Test whether a problem consists only of size constraints.
Atomic size expressions.
Size constraints we can solve.
Compute a set of size constraints that all live in the same context from constraints over terms of type size that may live in different contexts.
Turn a constraint over de Bruijn levels into a size constraint.
Turn a term with de Bruijn levels into a size expression with offset.
patternViolation if the term isn't a proper size expression.
Compute list of size metavariables with their arguments appearing in a constraint.
Convert size constraint into form where each meta is applied
n is the arity of that meta.
X[σ] <= t beomes
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.