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.LevelConstraints

  • 1 value
  • PackageAgda-2.7.0.1
  • Exports1
  • LanguageHaskell2010
  • LicenceMIT
  • SourceLevelConstraints.hs
valuesimplifyLevelConstraint
  1. :: Constraint

    Constraint c to simplify.

  2. -> [Constraint]

    Other constraints, enable simplification.

  3. -> 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.