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

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.Monad.Constraints

Contents

- Lenses

Synopsis

- currentProblem :: TCM ProblemId
- stealConstraints :: ProblemId -> TCM ()
- solvingProblem :: ProblemId -> TCM a -> TCM a
- solvingProblems :: [ProblemId] -> TCM a -> TCM a
- isProblemSolved :: ProblemId -> TCM Bool
- getConstraintsForProblem :: ProblemId -> TCM Constraints
- getAwakeConstraints :: TCM Constraints
- wakeConstraints :: (ProblemConstraint -> TCM Bool) -> TCM ()
- dropConstraints :: (ProblemConstraint -> Bool) -> TCM ()
- putConstraintsToSleep :: (ProblemConstraint -> Bool) -> TCM ()
- putAllConstraintsToSleep :: TCM ()
- data ConstraintStatus
  - = AwakeConstraint
  - | SleepingConstraint
- holdConstraints :: (ConstraintStatus -> ProblemConstraint -> Bool) -> TCM a -> TCM a
- takeAwakeConstraint :: TCM (Maybe ProblemConstraint)
- getAllConstraints :: TCM Constraints
- withConstraint :: (Constraint -> TCM a) -> ProblemConstraint -> TCM a
- buildProblemConstraint :: [ProblemId] -> Constraint -> TCM ProblemConstraint
- buildProblemConstraint_ :: Constraint -> TCM ProblemConstraint
- buildConstraint :: Constraint -> TCM ProblemConstraint
- addConstraint' :: Constraint -> TCM ()
- addAwakeConstraints :: Constraints -> TCM ()
- nowSolvingConstraints :: TCM a -> TCM a
- isSolvingConstraints :: TCM Bool
- mapAwakeConstraints :: (Constraints -> Constraints) -> TCState -> TCState
- mapSleepingConstraints :: (Constraints -> Constraints) -> TCState -> TCState
- modifyAwakeConstraints :: (Constraints -> Constraints) -> TCM ()
- modifySleepingConstraints :: (Constraints -> Constraints) -> TCM ()

# Documentation

currentProblem :: TCM ProblemId #

Get the current problem

stealConstraints :: ProblemId -> TCM () #

Steal all constraints belonging to the given problem and add them to the current problem.

solvingProblem :: ProblemId -> TCM a -> TCM a #

solvingProblems :: [ProblemId] -> TCM a -> TCM a #

isProblemSolved :: ProblemId -> TCM Bool #

getConstraintsForProblem :: ProblemId -> TCM Constraints #

getAwakeConstraints :: TCM Constraints #

Get the awake constraints

wakeConstraints :: (ProblemConstraint -> TCM Bool) -> TCM () #

dropConstraints :: (ProblemConstraint -> Bool) -> TCM () #

putConstraintsToSleep :: (ProblemConstraint -> Bool) -> TCM () #

putAllConstraintsToSleep :: TCM () #

data ConstraintStatus #

Constructors

AwakeConstraint |
SleepingConstraint |

Instances

Eq ConstraintStatus # |
Methods (==) :: ConstraintStatus -> ConstraintStatus -> Bool # (/=) :: ConstraintStatus -> ConstraintStatus -> Bool #
Show ConstraintStatus # |
Methods showsPrec :: Int -> ConstraintStatus -> ShowS # show :: ConstraintStatus -> String # showList :: [ConstraintStatus] -> ShowS #

holdConstraints :: (ConstraintStatus -> ProblemConstraint -> Bool) -> TCM a -> TCM a #

Suspend constraints matching the predicate during the execution of the second argument. Caution: held sleeping constraints will not be woken up by events that would normally trigger a wakeup call.

takeAwakeConstraint :: TCM (Maybe ProblemConstraint) #

getAllConstraints :: TCM Constraints #

withConstraint :: (Constraint -> TCM a) -> ProblemConstraint -> TCM a #

buildProblemConstraint :: [ProblemId] -> Constraint -> TCM ProblemConstraint #

buildProblemConstraint_ :: Constraint -> TCM ProblemConstraint #

buildConstraint :: Constraint -> TCM ProblemConstraint #

addConstraint' :: Constraint -> TCM () #

Add new a constraint

addAwakeConstraints :: Constraints -> TCM () #

Add already awake constraints

nowSolvingConstraints :: TCM a -> TCM a #

Start solving constraints

isSolvingConstraints :: TCM Bool #

# Lenses

mapAwakeConstraints :: (Constraints -> Constraints) -> TCState -> TCState #

mapSleepingConstraints :: (Constraints -> Constraints) -> TCState -> TCState #

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

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