Agda-2.8.0: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.LevelConstraints

Synopsis

- simplifyLevelConstraint :: Constraint -> List1 Constraint -> Maybe [Constraint]

# Documentation

simplifyLevelConstraint Source #

Arguments

:: Constraint | Constraint `c` to simplify.
-> List1 Constraint | Other constraints, enable simplification.
-> Maybe [Constraint] | `Just`: list of constraints equal to the original `c`. `Nothing`: no simplification possible.

`simplifyLevelConstraint c cs` turns an `c` into an equality constraint if it is an inequality constraint and the reverse inequality is contained in `cs`.

The constraints don't necessarily have to live in the same context, but they do need to be universally quanitfied over the context. This function takes care of renaming variables when checking for matches.