funsat-0.4: A modern DPLL-style SAT solverSource codeContentsIndex
DPLL.Monad
Description

The main SAT solver monad. Embeds ST. See type SSTErrMonad, which stands for ''State ST Error Monad''.

Most of the work done is in the form of SSTErrMonad actions.

Synopsis
liftST :: MonadST s m => ST s a -> m a
runSSTErrMonad :: Error e => SSTErrMonad e st s a -> (st -> ST s (Either e a, st))
evalSSTErrMonad :: Error e => SSTErrMonad e st s a -> st -> ST s (Either e a)
data SSTErrMonad e st s a
Documentation
liftST :: MonadST s m => ST s a -> m aSource
runSSTErrMonad :: Error e => SSTErrMonad e st s a -> (st -> ST s (Either e a, st))Source
runSSTErrMonad m s executes a SSTErrMonad action with initial state s until an error occurs or a result is returned.
evalSSTErrMonad :: Error e => SSTErrMonad e st s a -> st -> ST s (Either e a)Source
data SSTErrMonad e st s a Source

SSTErrMonad e st s a: the error type e, state type st, ST thread s and result type a.

This is a monad embedding ST and supporting error handling and state threading. It uses CPS to avoid checking Left and Right for every >>=; instead only checks on catchError. Idea adapted from http://haskell.org/haskellwiki/Performance/Monads.

show/hide Instances
Produced by Haddock version 2.1.0