Copyright | (c) Atze Dijkstra |
---|---|
License | BSD3 |
Maintainer | atzedijkstra@gmail.com |
Stability | experimental, (as of 20160218) under development |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell2010 |
A backtracking, logic programming monad partially derived and on top of logict, adding backtrackable state.
LogicT (and thus this library as well) is adapted from the paper /Backtracking, Interleaving, and Terminating Monad Transformers/, by Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, Amr Sabry (http://www.cs.rutgers.edu/~ccshan/logicprog/LogicT-icfp2005.pdf).
- module Control.Monad.Logic.Class
- module Control.Monad
- module Control.Monad.Trans
- module Control.Monad.LogicState.Class
- module Control.Monad.TransLogicState.Class
- type LogicState gs bs = LogicStateT gs bs Identity
- newtype LogicStateT gs bs m a = LogicStateT {
- unLogicStateT :: forall r. LogicContS gs bs r m a
Documentation
module Control.Monad.Logic.Class
module Control.Monad
module Control.Monad.Trans
The LogicState monad
type LogicState gs bs = LogicStateT gs bs Identity Source #
The basic LogicVar monad, for performing backtracking computations
returning values of type a
newtype LogicStateT gs bs m a Source #
A monad transformer for performing backtracking computations
layered over another monad m
, with propagation of global and backtracking state, e.g. resp. for freshness/uniqueness and maintaining variable mappings.
LogicStateT | |
|
MonadReader r m => MonadReader r (LogicStateT gs bs m) Source # | |
MonadTrans (LogicStateT gs bs) Source # | |
TransLogicState (gs, bs) (LogicStateT gs bs) Source # | |
Monad m => MonadState (gs, bs) (LogicStateT gs bs m) Source # | |
Monad m => MonadLogicState (gs, bs) (LogicStateT gs bs m) Source # | |
Monad (LogicStateT gs bs m) Source # | |
Functor (LogicStateT gs bs f) Source # | |
Applicative (LogicStateT gs bs f) Source # | |
MonadIO m => MonadIO (LogicStateT gs bs m) Source # | |
Alternative (LogicStateT gs bs f) Source # | |
MonadPlus (LogicStateT gs bs m) Source # | |
Monad m => MonadLogic (LogicStateT gs bs m) Source # | |