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

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.Constraints

Contents

- Orphan instances

Synopsis

- addConstraintTCM :: Blocker -> Constraint -> TCM ()
- wakeConstraintsTCM :: (ProblemConstraint -> WakeUp) -> TCM ()
- stealConstraintsTCM :: ProblemId -> TCM ()
- noConstraints :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => m a -> m a
- reallyNoConstraints :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => m a -> m a
- noConstraints' :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => Bool -> m a -> m a
- nonConstraining :: (HasOptions m, MonadConstraint m, MonadDebug m, MonadError TCErr m, MonadFresh ProblemId m, MonadTCEnv m, MonadWarning m) => m a -> m a
- newProblem :: (MonadFresh ProblemId m, MonadConstraint m) => m a -> m (ProblemId, a)
- newProblem_ :: (MonadFresh ProblemId m, MonadConstraint m) => m a -> m ProblemId
- ifNoConstraints :: TCM a -> (a -> TCM b) -> (ProblemId -> a -> TCM b) -> TCM b
- ifNoConstraints_ :: TCM () -> TCM a -> (ProblemId -> TCM a) -> TCM a
- guardConstraint :: Constraint -> TCM () -> TCM ()
- whenConstraints :: TCM () -> TCM () -> TCM ()
- wakeupConstraints :: MonadMetaSolver m => MetaId -> m ()
- wakeupConstraints_ :: TCM ()
- solveSomeAwakeConstraintsTCM :: (ProblemConstraint -> Bool) -> Bool -> TCM ()
- solveConstraintTCM :: Constraint -> TCM ()
- solveConstraint_ :: Constraint -> TCM ()
- checkTypeCheckingProblem :: TypeCheckingProblem -> TCM Term
- debugConstraints :: TCM ()
- updateBlocker :: PureTCM m => Blocker -> m Blocker
- addAndUnblocker :: (PureTCM m, MonadBlock m) => Blocker -> m a -> m a
- addOrUnblocker :: (PureTCM m, MonadBlock m) => Blocker -> m a -> m a
- withReduced :: (Reduce a, IsMeta a, PureTCM m, MonadBlock m) => a -> (a -> m b) -> m b

# Documentation

addConstraintTCM :: Blocker -> Constraint -> TCM () Source #

wakeConstraintsTCM :: (ProblemConstraint -> WakeUp) -> TCM () Source #

stealConstraintsTCM :: ProblemId -> TCM () Source #

Add all constraints belonging to the given problem to the current problem(s).

noConstraints :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => m a -> m a Source #

Don't allow the argument to produce any blocking constraints.

WARNING: this does not mean that the given computation cannot constrain the solution space further. It can well do so, by solving metas.

reallyNoConstraints :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => m a -> m a Source #

As noConstraints but also fail for non-blocking constraints.

noConstraints' :: (MonadConstraint m, MonadWarning m, MonadError TCErr m, MonadFresh ProblemId m) => Bool -> m a -> m a Source #

nonConstraining :: (HasOptions m, MonadConstraint m, MonadDebug m, MonadError TCErr m, MonadFresh ProblemId m, MonadTCEnv m, MonadWarning m) => m a -> m a Source #

Run a computation that should succeeds without constraining the solution space, i.e., not add any information about meta-variables.

newProblem :: (MonadFresh ProblemId m, MonadConstraint m) => m a -> m (ProblemId, a) Source #

Create a fresh problem for the given action.

newProblem_ :: (MonadFresh ProblemId m, MonadConstraint m) => m a -> m ProblemId Source #

ifNoConstraints :: TCM a -> (a -> TCM b) -> (ProblemId -> a -> TCM b) -> TCM b Source #

ifNoConstraints_ :: TCM () -> TCM a -> (ProblemId -> TCM a) -> TCM a Source #

guardConstraint :: Constraint -> TCM () -> TCM () Source #

`guardConstraint c blocker` tries to solve `blocker` first. If successful without constraints, it moves on to solve `c`, otherwise it adds a `c` to the constraint pool, blocked by the problem generated by `blocker`.

whenConstraints :: TCM () -> TCM () -> TCM () Source #

wakeupConstraints :: MonadMetaSolver m => MetaId -> m () Source #

Wake up the constraints depending on the given meta.

wakeupConstraints_ :: TCM () Source #

Wake up all constraints not blocked on a problem.

solveSomeAwakeConstraintsTCM :: (ProblemConstraint -> Bool) -> Bool -> TCM () Source #

Solve awake constraints matching the predicate. If the second argument is True solve constraints even if already `isSolvingConstraints`.

solveConstraintTCM :: Constraint -> TCM () Source #

solveConstraint_ :: Constraint -> TCM () Source #

checkTypeCheckingProblem :: TypeCheckingProblem -> TCM Term Source #

debugConstraints :: TCM () Source #

updateBlocker :: PureTCM m => Blocker -> m Blocker Source #

addAndUnblocker :: (PureTCM m, MonadBlock m) => Blocker -> m a -> m a Source #

addOrUnblocker :: (PureTCM m, MonadBlock m) => Blocker -> m a -> m a Source #

withReduced :: (Reduce a, IsMeta a, PureTCM m, MonadBlock m) => a -> (a -> m b) -> m b Source #

# Orphan instances

MonadConstraint TCM Source # |

Instance details

Methods

addConstraint :: Blocker -> Constraint -> TCM () Source #

addAwakeConstraint :: Blocker -> Constraint -> TCM () Source #

solveConstraint :: Constraint -> TCM () Source #

solveSomeAwakeConstraints :: (ProblemConstraint -> Bool) -> Bool -> TCM () Source #

wakeConstraints :: (ProblemConstraint -> WakeUp) -> TCM () Source #

stealConstraints :: ProblemId -> TCM () Source #

modifyAwakeConstraints :: (Constraints -> Constraints) -> TCM () Source #

modifySleepingConstraints :: (Constraints -> Constraints) -> TCM () Source #