monadiccp-0.7.7: Constraint Programming

Safe HaskellNone
LanguageHaskell98

Control.CP.FD.Interface

Synopsis

Documentation

data FDSolver s => FDInstance s a Source #

definition of FDInstance, a Solver wrapper that adds power to post boolean expressions as constraints

Instances

Monad s => Monad (FDInstance s) Source # 

Methods

(>>=) :: FDInstance s a -> (a -> FDInstance s b) -> FDInstance s b #

(>>) :: FDInstance s a -> FDInstance s b -> FDInstance s b #

return :: a -> FDInstance s a #

fail :: String -> FDInstance s a #

Functor s => Functor (FDInstance s) Source # 

Methods

fmap :: (a -> b) -> FDInstance s a -> FDInstance s b #

(<$) :: a -> FDInstance s b -> FDInstance s a #

Monad s => Applicative (FDInstance s) Source # 

Methods

pure :: a -> FDInstance s a #

(<*>) :: FDInstance s (a -> b) -> FDInstance s a -> FDInstance s b #

liftA2 :: (a -> b -> c) -> FDInstance s a -> FDInstance s b -> FDInstance s c #

(*>) :: FDInstance s a -> FDInstance s b -> FDInstance s b #

(<*) :: FDInstance s a -> FDInstance s b -> FDInstance s a #

FDSolver s => Solver (FDInstance s) Source # 

Associated Types

type Constraint (FDInstance s :: * -> *) :: * Source #

type Label (FDInstance s :: * -> *) :: * Source #

FDSolver s => Term (FDInstance s) ModelCol Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelCol :: * Source #

FDSolver s => Term (FDInstance s) ModelBool Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelBool :: * Source #

FDSolver s => Term (FDInstance s) ModelInt Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelInt :: * Source #

(FDSolver s, EnumTerm s (FDBoolTerm s)) => EnumTerm (FDInstance s) ModelBool Source # 
(FDSolver s, EnumTerm s (FDIntTerm s)) => EnumTerm (FDInstance s) ModelInt Source # 
type Constraint (FDInstance s) Source # 
type Label (FDInstance s) Source # 
type Label (FDInstance s)
type Help (FDInstance s) ModelCol Source # 
type Help (FDInstance s) ModelCol = ()
type Help (FDInstance s) ModelBool Source # 
type Help (FDInstance s) ModelBool = ()
type Help (FDInstance s) ModelInt Source # 
type Help (FDInstance s) ModelInt = ()
type TermBaseType (FDInstance s) ModelBool Source # 
type TermBaseType (FDInstance s) ModelInt Source # 

(@+) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 6 Source #

integer operators/functions | --

(@-) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 6 Source #

(@*) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(@/) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(@%) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(!) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b -> Expr t c b infix 9 Source #

list operators/functions | --

(@!!) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Integer -> Expr t c b infix 9 Source #

(@..) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> ColExpr t c b infix 9 Source #

(@++) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> ColExpr t c b -> ColExpr t c b infixr 5 Source #

size :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b Source #

xfold :: (Eq t, Eq c, Eq b) => (Expr t c b -> Expr t c b -> Expr t c b) -> Expr t c b -> ColExpr t c b -> Expr t c b Source #

xsum :: (Num (Expr t c b), Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b Source #

xhead :: (Eq t, Eq c, Eq b, ToColExpr t c b p) => p -> Expr t c b Source #

xtail :: (Eq t, Eq c, Eq b, ToColExpr t c b p) => p -> ColExpr t c b Source #

list :: (Eq t, Eq c, Eq b) => [Expr t c b] -> ColExpr t c b Source #

slice :: (Eq t, Eq c, Eq b) => ColExpr t c b -> ColExpr t c b -> ColExpr t c b Source #

xmap :: (Eq t, Eq c, Eq b) => (Expr t c b -> Expr t c b) -> ColExpr t c b -> ColExpr t c b Source #

(@||) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => Tree DummySolver () -> Tree DummySolver () -> m () infixr 2 Source #

(@&&) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => Tree DummySolver () -> Tree DummySolver () -> m () infixr 3 Source #

inv :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => Tree DummySolver () -> m () Source #

(@=) :: (ModelExprClass a, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => a -> a -> m () infix 4 Source #

(@/=) :: (ModelExprClass a, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => a -> a -> m () infix 4 Source #

(@<) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelInt -> ModelInt -> m () infix 4 Source #

(@>) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelInt -> ModelInt -> m () infix 4 Source #

(@<=) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelInt -> ModelInt -> m () infix 4 Source #

(@>=) :: (Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelInt -> ModelInt -> m () infix 4 Source #

(@??) :: ((~#) * * (Constraint (TreeSolver m)) (Either Model q), MonadTree m) => Tree DummySolver () -> (Tree DummySolver (), Tree DummySolver ()) -> m () infix 4 Source #

channel :: Tree DummySolver () -> ModelInt Source #

val :: Tree DummySolver () -> ModelInt Source #

forall :: (Term s ModelInt, Term s ModelBool, Term s ModelCol, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelCol -> (ModelInt -> Tree DummySolver ()) -> m () Source #

forany :: (Term s ModelInt, Term s ModelBool, Term s ModelCol, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => ModelCol -> (ModelInt -> Tree DummySolver ()) -> m () Source #

loopall :: (Term s ModelInt, Term s ModelBool, Term s ModelCol, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => (ModelInt, ModelInt) -> (ModelInt -> Tree DummySolver ()) -> m () Source #

loopany :: (Term s ModelInt, Term s ModelBool, Term s ModelCol, Constraint s ~ Either Model q, MonadTree m, TreeSolver m ~ s) => (ModelInt, ModelInt) -> (ModelInt -> Tree DummySolver ()) -> m () Source #

type ModelInt = ModelIntExpr ModelFunctions Source #

type ModelCol = ModelColExpr ModelFunctions Source #

type ModelBool = ModelBoolExpr ModelFunctions Source #

exists :: (MonadTree m, Term (TreeSolver m) t) => (t -> m a) -> m a Source #

true :: MonadTree tree => tree () Source #

false :: MonadTree m => m a Source #