Control.CP.Herbrand.Herbrand
Description
This module provides a Herbrand solver.
The type of terms is parameterized by the HTerm type class.
- class Ord (VarId t) => HTerm t where
- data Herbrand t a = Herbrand {}
- failure :: Monad m => m Bool
- success :: Monad m => m Bool
- unify :: (HTerm t, MonadState (HState t m) m) => t -> t -> m Bool
- shallow_normalize :: (HTerm t, MonadState (HState t m) m) => t -> m t
- registerAction :: (HTerm t, MonadState (HState t m) m) => t -> m Bool -> m ()
- data HState t m
- data Unify t
- initState :: HTerm t => HState t m
- addH :: (HTerm t, MonadState (HState t m) m) => Unify t -> m Bool
- newvarH :: (HTerm t, MonadState (HState t m) m) => m t
Documentation
class Ord (VarId t) => HTerm t whereSource
Herbrand terms
Methods
varSupply :: VarSupply tSource
supplyVar :: VarSupply t -> (t, VarSupply t)Source
isVar :: t -> Maybe (VarId t)Source
children :: t -> ([t], [t] -> t)Source
nonvar_unify :: MonadState (HState t m) m => t -> t -> m BoolSource
Instances
Herbrand monad
shallow_normalize :: (HTerm t, MonadState (HState t m) m) => t -> m tSource
registerAction :: (HTerm t, MonadState (HState t m) m) => t -> m Bool -> m ()Source
Instances
| MonadState (HState t (Herbrand t)) (Herbrand t) | |
| Solver s => MonadState (HState t (HerbrandT t s)) (HerbrandT t s) |
newvarH :: (HTerm t, MonadState (HState t m) m) => m tSource