cflp-0.2.0: Constraint Functional-Logic Programming in HaskellSource codeContentsIndex
Control.CFLP
Documentation
class (MonadConstr Choice m, ConstraintStore Choice cs, ChoiceStore cs, MonadSolve cs m m) => CFLP cs m Source
show/hide Instances
CFLP ChoiceStoreUnique (ConstrT ChoiceStoreUnique [])
CFLP ChoiceStoreUnique (ConstrT ChoiceStoreUnique [])
class ChoiceStore cs Source
show/hide Instances
ChoiceStore ChoiceStoreUnique
type Computation m a = CS -> ID -> Nondet CS (ConstrT CS m) aSource
eval :: (CFLP CS m, MonadSolve CS m m', Data a) => Strategy m' -> (CS -> ID -> Nondet CS m a) -> IO [a]Source
evalPartial :: (CFLP CS m, MonadSolve CS m m', Data a) => Strategy m' -> (CS -> ID -> Nondet CS m a) -> IO [a]Source
evalPrint :: (CFLP CS m, MonadSolve CS m m', Data a, Show a) => Strategy m' -> (CS -> ID -> Nondet CS m a) -> IO ()Source
type Strategy m = forall a. m a -> [a]Source
depthFirst :: Strategy []Source
data NormalForm Source
show/hide Instances
data Nondet cs m a Source
show/hide Instances
(Monad m, Data a) => MkCons cs m a (Nondet cs m t)
With x (Nondet cs m a)
Show (Nondet cs (ConstrT cs []) a)
Show (Nondet cs [] a)
WithUntyped (Nondet cs m a)
data ID Source
show/hide Instances
With ID a => With ID (ID -> a)
initID :: IO IDSource
withUnique :: With ID a => a -> ID -> Nondet (C ID a) (M ID a) (T ID a)Source
class ChoiceStore cs => Narrow cs a whereSource
Methods
narrowPolicy :: NarrowPolicy cs aSource
narrow :: MonadConstr Choice m => cs -> ID -> Nondet cs m aSource
show/hide Instances
ChoiceStore cs => Narrow cs Bool
(ChoiceStore cs, Narrow cs a) => Narrow cs ([] a)
data NarrowPolicy cs a Source
Constructors
OnDemand
OnCreation
unknown :: (MonadConstr Choice m, Narrow cs a) => cs -> ID -> Nondet cs m aSource
failure :: MonadPlus m => Nondet cs m aSource
oneOf :: (MonadConstr Choice m, ChoiceStore cs) => [Nondet cs m a] -> cs -> ID -> Nondet cs m aSource
withHNF :: (Monad m, MonadSolve cs m m) => Nondet cs m a -> (HeadNormalForm cs m -> cs -> Nondet cs m b) -> cs -> Nondet cs m bSource
caseOf :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m a -> [Match a cs m b] -> cs -> Nondet cs m bSource
caseOf_ :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m a -> [Match a cs m b] -> Nondet cs m b -> cs -> Nondet cs m bSource
data Match a cs m b Source
Data (gfoldl, gunfold, toConstr, dataTypeOf, dataCast1, dataCast2, gmapT, gmapQl, gmapQr, gmapQ, gmapQi, gmapM, gmapMp, gmapMo)
nondet :: (Monad m, Data a) => a -> Nondet cs m aSource
groundNormalForm :: MonadSolve cs m m' => Nondet cs m a -> cs -> m' NormalFormSource
partialNormalForm :: (MonadSolve cs m m', ChoiceStore cs) => Nondet cs m a -> cs -> m' NormalFormSource
class ConsRep a whereSource
Methods
consRep :: a -> ConstrSource
show/hide Instances
cons :: MkCons cs m a b => a -> bSource
match :: (ConsRep a, WithUntyped b) => a -> (C b -> b) -> Match t (C b) (M b) (T b)Source
true :: Monad m => Nondet cs m BoolSource
pTrue :: (cs -> Nondet cs m a) -> Match Bool cs m aSource
false :: Monad m => Nondet cs m BoolSource
pFalse :: (cs -> Nondet cs m a) -> Match Bool cs m aSource
not :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m Bool -> cs -> Nondet cs m BoolSource
(===) :: MonadSolve cs m m => Nondet cs m a -> Nondet cs m a -> cs -> Nondet cs m BoolSource
nil :: Monad m => Nondet cs m [a]Source
pNil :: (cs -> Nondet cs m b) -> Match [a] cs m bSource
(^:) :: Monad m => Nondet cs m a -> Nondet cs m [a] -> Nondet cs m [a]Source
pCons :: (cs -> Nondet cs m a -> Nondet cs m [a] -> Nondet cs m b) -> Match [a] cs m bSource
fromList :: Monad m => [Nondet cs m a] -> Nondet cs m [a]Source
null :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m [a] -> cs -> Nondet cs m BoolSource
head :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m [a] -> cs -> Nondet cs m aSource
tail :: (MonadSolve cs m m, MonadConstr Choice m) => Nondet cs m [a] -> cs -> Nondet cs m [a]Source
Produced by Haddock version 2.4.2