clingo- Haskell bindings to the Clingo ASP solver

Safe HaskellNone




class MonadModel m => MonadSolve m where Source #

Minimal complete definition

getResult, getModel, solverWait, solverResume, solverCancel


getResult :: Solver s -> m s SolveResult Source #

Get the next solve result.

getModel :: Solver s -> m s (Maybe (Model s)) Source #

Get the next model if it exists.

solverWait :: Solver s -> Double -> m s ResultReady Source #

Wait for the specified time to check if the result is ready.

solverResume :: Solver s -> m s () Source #

Discard the last model and start search for the next.

solverCancel :: Solver s -> m s () Source #

Stop the running search and block until done.

solverClose :: Solver s -> Clingo s () Source #

Stops the running search and releases the handle. Blocks until search is stopped.

allModels :: (Monad (m s), MonadSolve m) => Solver s -> m s [Model s] Source #

Convenience method to get all models. Note that this is dependent on the solver configuration!