Hets - the Heterogeneous Tool Set

Copyright(c) 2005 Amr Sabry Chung-chieh Shan Oleg Kiselyov
and Daniel P. Friedman
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerMihai.Codescu@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe

Common.LogicT

Description

Logic Monad Transformer: MonadPlusT with interleave, bindi, ifte and once Definition and implementation of generic operations, in terms of msplit

Documentation

class MonadTrans t => LogicT t where Source #

Minimal complete definition

msplit

Methods

msplit :: (Monad m, MonadPlus (t m)) => t m a -> t m (Maybe (a, t m a)) Source #

interleave :: (Monad m, MonadPlus (t m)) => t m a -> t m a -> t m a Source #

gsuccess :: (Monad m, MonadPlus (t m)) => a -> t m a Source #

gfail :: (Monad m, MonadPlus (t m)) => t m a Source #

bindi :: (Monad m, MonadPlus (t m)) => t m a -> (a -> t m b) -> t m b Source #

ifte :: (Monad m, MonadPlus (t m)) => t m a -> (a -> t m b) -> t m b -> t m b Source #

once :: (Monad m, MonadPlus (t m)) => t m a -> t m a Source #

Instances

LogicT SFKT Source # 

Methods

msplit :: (Monad m, MonadPlus (SFKT m)) => SFKT m a -> SFKT m (Maybe (a, SFKT m a)) Source #

interleave :: (Monad m, MonadPlus (SFKT m)) => SFKT m a -> SFKT m a -> SFKT m a Source #

gsuccess :: (Monad m, MonadPlus (SFKT m)) => a -> SFKT m a Source #

gfail :: (Monad m, MonadPlus (SFKT m)) => SFKT m a Source #

bindi :: (Monad m, MonadPlus (SFKT m)) => SFKT m a -> (a -> SFKT m b) -> SFKT m b Source #

ifte :: (Monad m, MonadPlus (SFKT m)) => SFKT m a -> (a -> SFKT m b) -> SFKT m b -> SFKT m b Source #

once :: (Monad m, MonadPlus (SFKT m)) => SFKT m a -> SFKT m a Source #

bagofN :: (Monad m, LogicT t, MonadPlus (t m)) => Maybe Int -> t m a -> t m [a] Source #

reflect :: (Monad m, LogicT t, MonadPlus (t m)) => Maybe (a, t m a) -> t m a Source #