Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- solvingProblem :: MonadConstraint m => ProblemId -> m a -> m a
- solvingProblems :: MonadConstraint m => Set ProblemId -> m a -> m a
- isProblemSolved :: (MonadTCEnv m, ReadTCState m) => ProblemId -> m Bool
- getConstraintsForProblem :: ReadTCState m => ProblemId -> m Constraints
- getAwakeConstraints :: ReadTCState m => m Constraints
- dropConstraints :: MonadConstraint m => (ProblemConstraint -> Bool) -> m ()
- takeConstraints :: MonadConstraint m => (ProblemConstraint -> Bool) -> m Constraints
- putConstraintsToSleep :: MonadConstraint m => (ProblemConstraint -> Bool) -> m ()
- putAllConstraintsToSleep :: MonadConstraint m => m ()
- data ConstraintStatus
- holdConstraints :: (ConstraintStatus -> ProblemConstraint -> Bool) -> TCM a -> TCM a
- takeAwakeConstraint :: MonadConstraint m => m (Maybe ProblemConstraint)
- takeAwakeConstraint' :: MonadConstraint m => (ProblemConstraint -> Bool) -> m (Maybe ProblemConstraint)
- getAllConstraints :: ReadTCState m => m Constraints
- withConstraint :: MonadConstraint m => (Constraint -> m a) -> ProblemConstraint -> m a
- buildProblemConstraint :: (MonadTCEnv m, ReadTCState m) => Set ProblemId -> Blocker -> Constraint -> m ProblemConstraint
- buildProblemConstraint_ :: (MonadTCEnv m, ReadTCState m) => Blocker -> Constraint -> m ProblemConstraint
- buildConstraint :: Blocker -> Constraint -> TCM ProblemConstraint
- class (MonadTCEnv m, ReadTCState m, MonadError TCErr m, MonadBlock m, HasOptions m, MonadDebug m) => MonadConstraint m where
- addConstraint :: Blocker -> Constraint -> m ()
- addAwakeConstraint :: Blocker -> Constraint -> m ()
- solveConstraint :: Constraint -> m ()
- solveSomeAwakeConstraints :: (ProblemConstraint -> Bool) -> Bool -> m ()
- wakeConstraints :: (ProblemConstraint -> WakeUp) -> m ()
- stealConstraints :: ProblemId -> m ()
- modifyAwakeConstraints :: (Constraints -> Constraints) -> m ()
- modifySleepingConstraints :: (Constraints -> Constraints) -> m ()
- addAndUnblocker :: MonadBlock m => Blocker -> m a -> m a
- addOrUnblocker :: MonadBlock m => Blocker -> m a -> m a
- addConstraint' :: Blocker -> Constraint -> TCM ()
- addAwakeConstraint' :: Blocker -> Constraint -> TCM ()
- addConstraintTo :: Lens' Constraints TCState -> Blocker -> Constraint -> TCM ()
- nowSolvingConstraints :: MonadTCEnv m => m a -> m a
- isSolvingConstraints :: MonadTCEnv m => m Bool
- catchConstraint :: MonadConstraint m => Constraint -> m () -> m ()
- mapAwakeConstraints :: (Constraints -> Constraints) -> TCState -> TCState
- mapSleepingConstraints :: (Constraints -> Constraints) -> TCState -> TCState
Documentation
solvingProblem :: MonadConstraint m => ProblemId -> m a -> m a Source #
solvingProblems :: MonadConstraint m => Set ProblemId -> m a -> m a Source #
isProblemSolved :: (MonadTCEnv m, ReadTCState m) => ProblemId -> m Bool Source #
getConstraintsForProblem :: ReadTCState m => ProblemId -> m Constraints Source #
getAwakeConstraints :: ReadTCState m => m Constraints Source #
Get the awake constraints
dropConstraints :: MonadConstraint m => (ProblemConstraint -> Bool) -> m () Source #
takeConstraints :: MonadConstraint m => (ProblemConstraint -> Bool) -> m Constraints Source #
Takes out all constraints matching given filter. Danger! The taken constraints need to be solved or put back at some point.
putConstraintsToSleep :: MonadConstraint m => (ProblemConstraint -> Bool) -> m () Source #
putAllConstraintsToSleep :: MonadConstraint m => m () Source #
data ConstraintStatus Source #
Instances
Show ConstraintStatus Source # | |
Defined in Agda.TypeChecking.Monad.Constraints showsPrec :: Int -> ConstraintStatus -> ShowS # show :: ConstraintStatus -> String # showList :: [ConstraintStatus] -> ShowS # | |
Eq ConstraintStatus Source # | |
Defined in Agda.TypeChecking.Monad.Constraints (==) :: ConstraintStatus -> ConstraintStatus -> Bool # (/=) :: ConstraintStatus -> ConstraintStatus -> Bool # |
holdConstraints :: (ConstraintStatus -> ProblemConstraint -> Bool) -> TCM a -> TCM a Source #
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 :: MonadConstraint m => m (Maybe ProblemConstraint) Source #
takeAwakeConstraint' :: MonadConstraint m => (ProblemConstraint -> Bool) -> m (Maybe ProblemConstraint) Source #
getAllConstraints :: ReadTCState m => m Constraints Source #
withConstraint :: MonadConstraint m => (Constraint -> m a) -> ProblemConstraint -> m a Source #
buildProblemConstraint :: (MonadTCEnv m, ReadTCState m) => Set ProblemId -> Blocker -> Constraint -> m ProblemConstraint Source #
buildProblemConstraint_ :: (MonadTCEnv m, ReadTCState m) => Blocker -> Constraint -> m ProblemConstraint Source #
buildConstraint :: Blocker -> Constraint -> TCM ProblemConstraint Source #
class (MonadTCEnv m, ReadTCState m, MonadError TCErr m, MonadBlock m, HasOptions m, MonadDebug m) => MonadConstraint m where Source #
Monad service class containing methods for adding and solving constraints
addConstraint :: Blocker -> Constraint -> m () Source #
Unconditionally add the constraint.
addAwakeConstraint :: Blocker -> Constraint -> m () Source #
Add constraint as awake constraint.
solveConstraint :: Constraint -> m () Source #
solveSomeAwakeConstraints :: (ProblemConstraint -> Bool) -> Bool -> m () Source #
Solve awake constraints matching the predicate. If the second argument is
True solve constraints even if already isSolvingConstraints
.
wakeConstraints :: (ProblemConstraint -> WakeUp) -> m () Source #
stealConstraints :: ProblemId -> m () Source #
modifyAwakeConstraints :: (Constraints -> Constraints) -> m () Source #
modifySleepingConstraints :: (Constraints -> Constraints) -> m () Source #
Instances
addAndUnblocker :: MonadBlock m => Blocker -> m a -> m a Source #
addOrUnblocker :: MonadBlock m => Blocker -> m a -> m a Source #
addConstraint' :: Blocker -> Constraint -> TCM () Source #
Add new a constraint
addAwakeConstraint' :: Blocker -> Constraint -> TCM () Source #
addConstraintTo :: Lens' Constraints TCState -> Blocker -> Constraint -> TCM () Source #
nowSolvingConstraints :: MonadTCEnv m => m a -> m a Source #
Start solving constraints
isSolvingConstraints :: MonadTCEnv m => m Bool Source #
catchConstraint :: MonadConstraint m => Constraint -> m () -> m () Source #
Add constraint if the action raises a pattern violation
Lenses
mapAwakeConstraints :: (Constraints -> Constraints) -> TCState -> TCState Source #
mapSleepingConstraints :: (Constraints -> Constraints) -> TCState -> TCState Source #