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

ModuleAgda-2.7.0.1Haskell2010

Agda.TypeChecking.Free.Reduce

Free variable check that reduces the subject to make certain variables not free. Used when pruning metavariables in Agda.TypeChecking.MetaVars.Occurs.

  • 1 type
  • 1 class
  • 2 values
  • PackageAgda-2.7.0.1
  • Exports4
  • LanguageHaskell2010
  • LicenceMIT
  • SourceReduce.hs
classclass (PrecomputeFreeVars a, Subst a) => ForceNotFree a where
#
Instances10ForceNotFree, …
valueforceNotFree
  1. :: (ForceNotFree a, Reduce a, MonadReduce m)
  2. => IntSet
  3. -> a
  4. -> m (IntMap IsFree, a)
#

Try to enforce a set of variables not occurring in a given type. Returns a possibly reduced version of the type and for each of the given variables whether it is either not free, or maybe free depending on some metavariables.

valuereallyFree
  1. :: (MonadReduce m, Reduce a, ForceNotFree a)
  2. => IntSet
  3. -> a
  4. -> m (Either Blocked_ (Maybe a))
#

Checks if the given term contains any free variables that are in the given set of variables, possibly reducing the term in the process. Returns `Right Nothing` if there are such variables, `Right (Just v')` if there are none (where v' is the possibly reduced version of the given term) or `Left b` if the problem is blocked on a meta.

datadata IsFree
#

A variable can either not occur (NotFree) or it does occur (MaybeFree). In the latter case, the occurrence may disappear depending on the instantiation of some set of metas.

Instances2Eq, Show
  • Eq IsFreeDefined in Agda-2.7.0.1 · Agda.TypeChecking.Free.Reduce
  • Show IsFreeDefined in Agda-2.7.0.1 · Agda.TypeChecking.Free.Reduce