-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Constraint Programming -- -- Gecode extension for the Monadic Constraint Programming Framework -- (code generator and runtime solver backend) @package monadiccp-gecode @version 0.1 module Control.CP.FD.Gecode.Common class (Solver s, Term s (GecodeIntVar s), Term s (GecodeBoolVar s), Eq (GecodeIntVar s), Eq (GecodeBoolVar s), Eq (GecodeColVar s), Ord (GecodeIntVar s), Ord (GecodeBoolVar s), Ord (GecodeColVar s), Show (GecodeIntVar s), Show (GecodeBoolVar s), Show (GecodeColVar s)) => GecodeSolver s where type family GecodeIntVar s :: * type family GecodeBoolVar s :: * type family GecodeColVar s :: * col_regList _ = return () newInt_at :: GecodeSolver s => GecodeColVar s -> GecodeIntConst -> s (GecodeIntVar s) newInt_cond :: GecodeSolver s => GecodeBoolConst -> GecodeIntVar s -> GecodeIntVar s -> s (GecodeIntVar s) newCol_list :: GecodeSolver s => [GecodeIntVar s] -> s (GecodeColVar s) newCol_size :: GecodeSolver s => GecodeIntConst -> s (GecodeColVar s) newCol_cat :: GecodeSolver s => GecodeColVar s -> GecodeColVar s -> s (GecodeColVar s) splitIntDomain :: GecodeSolver s => GecodeIntVar s -> s ([GecodeConstraint s], Bool) splitBoolDomain :: GecodeSolver s => GecodeBoolVar s -> s ([GecodeConstraint s], Bool) col_getSize :: GecodeSolver s => GecodeColVar s -> s GecodeIntConst col_regList :: GecodeSolver s => GecodeColConst -> s () data GecodeSolver s => GecodeConstraint s GCBoolVal :: (GecodeBoolVar s) -> GecodeBoolConst -> GecodeConstraint s GCBoolEqual :: (GecodeBoolVar s) -> (GecodeBoolVar s) -> GecodeConstraint s GCIntVal :: (GecodeIntVar s) -> GecodeIntConst -> GecodeConstraint s GCLinear :: (GecodeLinear s) -> GecodeOperator -> GecodeConstraint s GCLinearReif :: (GecodeLinear s) -> GecodeOperator -> (GecodeBoolVar s) -> GecodeConstraint s GCColEqual :: (GecodeColVar s) -> (GecodeColVar s) -> GecodeConstraint s GCMult :: (GecodeIntVar s) -> (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCDiv :: (GecodeIntVar s) -> (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCMod :: (GecodeIntVar s) -> (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCAbs :: (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCAt :: (GecodeIntVarOrConst s) -> (GecodeColVarOrConst s) -> (GecodeIntVarOrConst s) -> GecodeConstraint s GCChannel :: (GecodeIntVar s) -> (GecodeBoolVar s) -> GecodeConstraint s GCSize :: (GecodeColVar s) -> (GecodeIntVarOrConst s) -> GecodeConstraint s GCCat :: (GecodeColVar s) -> (GecodeColVar s) -> (GecodeColVar s) -> GecodeConstraint s GCSlice :: (GecodeColVar s) -> (GecodeColSection s) -> GecodeConstraint s GCAnd :: [GecodeBoolVar s] -> (GecodeBoolVar s) -> GecodeConstraint s GCOr :: [GecodeBoolVar s] -> (GecodeBoolVar s) -> GecodeConstraint s GCNot :: (GecodeBoolVar s) -> (GecodeBoolVar s) -> GecodeConstraint s GCEquiv :: (GecodeBoolVar s) -> (GecodeBoolVar s) -> (GecodeBoolVar s) -> GecodeConstraint s GCAllDiff :: Bool -> (GecodeColVarOrSection s) -> GecodeConstraint s GCSorted :: (GecodeColVarOrSection s) -> GecodeOperator -> GecodeConstraint s GCAll :: (GecodeIBFn s) -> (GecodeColVarOrSection s) -> (Maybe (GecodeBoolVar s)) -> GecodeConstraint s GCAny :: (GecodeIBFn s) -> (GecodeColVarOrSection s) -> (Maybe (GecodeBoolVar s)) -> GecodeConstraint s GCAllC :: (GecodeCBFn s) -> (GecodeListConst) -> (Maybe (GecodeBoolVar s)) -> GecodeConstraint s GCAnyC :: (GecodeCBFn s) -> (GecodeListConst) -> (Maybe (GecodeBoolVar s)) -> GecodeConstraint s GCMap :: (GecodeIIFn s) -> (GecodeColVarOrSection s) -> (GecodeColVar s) -> GecodeConstraint s GCFold :: (GecodeIIIFn s) -> (GecodeColVarOrSection s) -> (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCFoldC :: (GecodeICIFn s) -> (GecodeIntConst) -> (GecodeIntVar s) -> (GecodeIntVar s) -> GecodeConstraint s GCSum :: (GecodeColVarOrSection s) -> (GecodeIntVarOrConst s) -> GecodeConstraint s GCCount :: (GecodeColVar s) -> (GecodeIntVarOrConst s) -> GecodeOperator -> (GecodeIntVarOrConst s) -> GecodeConstraint s GCDom :: (GecodeIntVar s) -> (GecodeColVarOrConst s) -> (Maybe (GecodeBoolVar s)) -> GecodeConstraint s GCCond :: (GecodeConstraint s) -> GecodeBoolConst -> GecodeConstraint s data GecodeOperator GOEqual :: GecodeOperator GODiff :: GecodeOperator GOLess :: GecodeOperator GOLessEqual :: GecodeOperator data GecodeBoolSpecType GBSConst :: GecodeBoolSpecType GBSCondConst :: GecodeBoolSpecType GBSVar :: GecodeBoolSpecType data GecodeIntSpecType GISConst :: GecodeIntSpecType GISLinear :: GecodeIntSpecType GISVar :: GecodeIntSpecType data GecodeColSpecType GCSConst :: GecodeColSpecType GCSSection :: GecodeColSpecType GCSVar :: GecodeColSpecType data GecodeIntSpec s GITConst :: GecodeIntConst -> GecodeIntSpec s GITLinear :: (GecodeLinear s) -> GecodeIntSpec s GITVar :: (GecodeIntVar s) -> GecodeIntSpec s data GecodeBoolSpec s GBTConst :: GecodeBoolConst -> GecodeBoolSpec s GBTCondConst :: GecodeBoolConst -> GecodeBoolConst -> GecodeBoolSpec s GBTVar :: (GecodeBoolVar s) -> GecodeBoolSpec s data GecodeColSpec s GCTConst :: (GecodeColConst) -> GecodeColSpec s GCTSection :: (GecodeColSection s) -> GecodeColSpec s GCTVar :: (GecodeColVar s) -> GecodeColSpec s newtype GecodeIBFn s GecodeIBFn :: (GecodeIntVar s -> GecodeBoolVar s -> s ()) -> GecodeIBFn s newtype GecodeIIFn s GecodeIIFn :: (GecodeIntVar s -> GecodeIntVar s -> s ()) -> GecodeIIFn s newtype GecodeIIIFn s GecodeIIIFn :: (GecodeIntVar s -> GecodeIntVar s -> GecodeIntVar s -> s ()) -> GecodeIIIFn s newtype GecodeICIFn s GecodeICIFn :: (GecodeIntVar s -> GecodeIntConst -> GecodeIntVar s -> s ()) -> GecodeICIFn s newtype GecodeCBFn s GecodeCBFn :: (GecodeIntConst -> GecodeBoolVar s -> s ()) -> GecodeCBFn s newtype GecodeCIFn s GecodeCIFn :: (GecodeIntConst -> GecodeIntVar s -> s ()) -> GecodeCIFn s type GecodeIntConst = Expr GecodeIntParam GecodeColParam GecodeBoolParam type GecodeBoolConst = BoolExpr GecodeIntParam GecodeColParam GecodeBoolParam type GecodeColConst = ColExpr GecodeIntParam GecodeColParam GecodeBoolParam type GecodeListConst = (GecodeIntConst, GecodeIntConst -> GecodeIntConst) newtype GecodeIntParam GIParam :: Int -> GecodeIntParam newtype GecodeBoolParam GBParam :: Int -> GecodeBoolParam newtype GecodeColParam GCParam :: Int -> GecodeColParam type GecodeLinear s = Linear (GecodeIntVar s) GecodeIntConst type GecodeColVarOrSection s = Either (GecodeColVar s) (GecodeColSection s) data GecodeWrappedSolver s a liftGC :: (GecodeSolver s, Constraint s ~ GecodeConstraint s) => s a -> (GecodeWrappedSolver s) a unliftGC :: (GecodeSolver s, Constraint s ~ GecodeConstraint s) => (GecodeWrappedSolver s) a -> s a toConst :: Integral a => a -> GecodeIntConst fromConst :: Num a => GecodeIntConst -> a toBoolConst :: Bool -> GecodeBoolConst fromBoolConst :: GecodeBoolConst -> Bool addMeta :: (GecodeSolver s, Constraint s ~ GecodeConstraint s) => Mixin (GecodeConstraint s -> s Bool) procConstraint :: (GecodeSolver t, GecodeSolver s) => GecodeConstraint t -> s () instance (GecodeSolver s, Eq (GecodeIntVar s), Eq (GecodeBoolVar s), Eq (GecodeColVar s), Ord (GecodeIntVar s), Ord (GecodeBoolVar s), Ord (GecodeColVar s), Show (GecodeIntVar s), Show (GecodeBoolVar s), Show (GecodeColVar s)) => Show (GecodeConstraint s) instance (Eq (GecodeColVar s), Show (GecodeColVar s), Ord (GecodeColVar s)) => Show (GecodeColSpec s) instance (Eq (GecodeBoolVar s), Show (GecodeBoolVar s), Ord (GecodeBoolVar s)) => Show (GecodeBoolSpec s) instance (Eq (GecodeIntVar s), Show (GecodeIntVar s), Ord (GecodeIntVar s)) => Show (GecodeIntSpec s) instance Show GecodeIntParam instance Eq GecodeIntParam instance Ord GecodeIntParam instance Show GecodeBoolParam instance Eq GecodeBoolParam instance Ord GecodeBoolParam instance Show GecodeColParam instance Eq GecodeColParam instance Ord GecodeColParam instance Enum GecodeIntSpecType instance Bounded GecodeIntSpecType instance Eq GecodeIntSpecType instance Ord GecodeIntSpecType instance Show GecodeIntSpecType instance Enum GecodeBoolSpecType instance Bounded GecodeBoolSpecType instance Eq GecodeBoolSpecType instance Ord GecodeBoolSpecType instance Show GecodeBoolSpecType instance Enum GecodeColSpecType instance Bounded GecodeColSpecType instance Eq GecodeColSpecType instance Ord GecodeColSpecType instance Show GecodeColSpecType instance Eq GecodeOperator instance Ord GecodeOperator instance Show GecodeOperator instance (GecodeSolver s, GecodeConstraint s ~ Constraint s) => FDSolver (GecodeWrappedSolver s) instance (GecodeSolver s, Term s t, Constraint s ~ GecodeConstraint s) => Term (GecodeWrappedSolver s) t instance (GecodeSolver s, Constraint s ~ GecodeConstraint s) => Solver (GecodeWrappedSolver s) instance (GecodeSolver s, Constraint s ~ GecodeConstraint s) => Monad (GecodeWrappedSolver s) instance (GecodeSolver s, Constraint s ~ GecodeConstraint s, EnumTerm s t) => EnumTerm (GecodeWrappedSolver s) t instance (GecodeSolver s, Constraint s ~ GecodeConstraint s) => GecodeSolver (GecodeWrappedSolver s) instance GecodeSolver s => Show (GecodeFn s) instance Show (GecodeICIFn s) instance Show (GecodeIIIFn s) instance Show (GecodeIIFn s) instance Show (GecodeCIFn s) instance Show (GecodeCBFn s) instance Show (GecodeIBFn s) instance Show (GecodeIntConst -> GecodeIntConst) instance Procable a => Procable [a] instance Procable (a, GecodeListConst) instance Procable GecodeListConst instance (Ord b, Num a, Procable a) => Procable (Linear b a) instance Procable a => Procable (Either b a) instance Procable GecodeColConst instance Procable GecodeBoolConst instance Procable GecodeIntConst module Control.CP.FD.Gecode.Interface data CGIntVar data CGBoolVar data CGColVar type Space = ForeignPtr GecodeModel type Search = ForeignPtr GecodeSearch newSpace :: IO Space copySpace :: Space -> IO Space newSearch :: Space -> Bool -> IO Search runSearch :: Search -> IO (Maybe Space) newInt :: Space -> IO CGIntVar newIntAt :: Space -> CGColVar -> Int -> IO CGIntVar newBool :: Space -> IO CGBoolVar newColList :: Space -> [CGIntVar] -> IO CGColVar newColSize :: Space -> Int -> IO CGColVar newColCat :: Space -> CGColVar -> CGColVar -> IO CGColVar newColTake :: Space -> CGColVar -> Int -> Int -> IO CGColVar getColSize :: Space -> CGColVar -> IO GecodeIntConst addConstraint :: (GecodeSolver s, GecodeIntVar s ~ CGIntVar, GecodeBoolVar s ~ CGBoolVar, GecodeColVar s ~ CGColVar) => Space -> GecodeConstraint s -> IO Bool propagate :: Space -> IO () postBranchers :: Space -> ([CGBoolVar], [CGIntVar], [CGColVar]) -> IO () data IntInfo IntInfo :: !CInt -> !CInt -> !CInt -> !CInt -> !(Maybe CInt) -> IntInfo iti_low :: IntInfo -> !CInt iti_high :: IntInfo -> !CInt iti_med :: IntInfo -> !CInt iti_size :: IntInfo -> !CInt iti_val :: IntInfo -> !(Maybe CInt) getIntInfo :: Space -> CGIntVar -> IO (Maybe IntInfo) getBoolInfo :: Space -> CGBoolVar -> IO Int modRefcount :: Space -> Int -> IO Int setCost :: Space -> CGIntVar -> IO () instance Storable CGOperator instance Storable CGIntVar instance Eq CGIntVar instance Ord CGIntVar instance Show CGIntVar instance Storable CGColVar instance Eq CGColVar instance Ord CGColVar instance Show CGColVar instance Storable CGBoolVar instance Eq CGBoolVar instance Ord CGBoolVar instance Show CGBoolVar instance Storable CGBool instance Storable CGVal instance Num CGVal instance Eq CGVal instance Show CGVal module Control.CP.FD.Gecode.Runtime data RuntimeGecodeSolver a instance Monad RuntimeGecodeSolver instance MonadState RuntimeGecodeState RuntimeGecodeSolver instance MonadIO RuntimeGecodeSolver instance EnumTerm RuntimeGecodeSolver CGBoolVar instance EnumTerm RuntimeGecodeSolver CGIntVar instance GecodeSolver RuntimeGecodeSolver instance Term RuntimeGecodeSolver CGBoolVar instance Term RuntimeGecodeSolver CGIntVar instance Solver RuntimeGecodeSolver module Control.CP.FD.Gecode.RuntimeSearch data SearchGecodeSolver a data SearchGecodeOptions SearchGecodeOptions :: Maybe CGIntVar -> SearchGecodeOptions minimizeVar :: SearchGecodeOptions -> Maybe CGIntVar setOptions :: (SearchGecodeOptions -> SearchGecodeOptions) -> SearchGecodeSolver () instance Monad SearchGecodeSolver instance MonadState SearchGecodeState SearchGecodeSolver instance MonadIO SearchGecodeSolver instance EnumTerm SearchGecodeSolver CGBoolVar instance EnumTerm SearchGecodeSolver CGIntVar instance GecodeSolver SearchGecodeSolver instance Term SearchGecodeSolver CGBoolVar instance Term SearchGecodeSolver CGIntVar instance Solver SearchGecodeSolver module Control.CP.FD.Gecode.CodegenSolver generateGecode :: CompilableModel t => t -> String data CodegenGecodeSolver a data CodegenGecodeOptions CodegenGecodeOptions :: Bool -> Bool -> CodegenGecodeOptions noTrailing :: CodegenGecodeOptions -> Bool noGenSearch :: CodegenGecodeOptions -> Bool setOptions :: (CodegenGecodeOptions -> CodegenGecodeOptions) -> CodegenGecodeSolver () instance Show IntParDef instance Show ColParDef instance Show CodegenGecodeOptions instance Eq BoolVar instance Ord BoolVar instance Show BoolVar instance Eq ColVar instance Ord ColVar instance Show ColVar instance Eq IntVar instance Ord IntVar instance Show IntVar instance Show ColDef instance Monad CodegenGecodeSolver instance MonadState CodegenGecodeState CodegenGecodeSolver instance Show CodegenGecodeState instance Num CPPExpr instance CompilableModel (Tree (FDInstance (GecodeWrappedSolver CodegenGecodeSolver)) ModelCol) instance CompilableModel m => CompilableModel (ModelCol -> m) instance CompilableModel m => CompilableModel (ModelInt -> m) instance CompilableModel (FDInstance (GecodeWrappedSolver CodegenGecodeSolver) (SearchSpec ModelInt ModelCol ModelBool)) instance CompilableModel (FDInstance (GecodeWrappedSolver CodegenGecodeSolver) ModelCol) instance CompilableModel (CodegenGecodeSolver a) instance GecodeSolver CodegenGecodeSolver instance Term CodegenGecodeSolver BoolVar instance Term CodegenGecodeSolver IntVar instance Show (CPPExpr -> CPPExpr) instance Ord (CPPExpr -> CPPExpr) instance Eq (CPPExpr -> CPPExpr) instance Solver CodegenGecodeSolver module Control.CP.FD.GecodeExample example_main_gecode :: ExampleModel [String] -> ExampleModel ModelInt -> ExampleModel ModelCol -> Bool -> IO () example_sat_main_gecode :: ExampleModel [String] -> ExampleModel ModelInt -> ExampleModel ModelCol -> IO () example_sat_main_void_gecode :: ExampleModel () -> IO () example_sat_main_single_gecode :: Read n => ExampleModel n -> IO () example_sat_main_single_expr_gecode :: ExampleModel ModelInt -> IO () example_sat_main_coll_expr_gecode :: ExampleModel ModelCol -> IO () example_min_main_gecode :: ExampleMinModel [String] -> ExampleMinModel ModelInt -> ExampleMinModel ModelCol -> IO () example_min_main_void_gecode :: ExampleMinModel () -> IO () example_min_main_single_gecode :: Read n => ExampleMinModel n -> IO () example_min_main_single_expr_gecode :: ExampleMinModel ModelInt -> IO () example_min_main_coll_expr_gecode :: ExampleMinModel ModelCol -> IO ()