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-Inferred

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

Minimal complete definition

msplit

Methods

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

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

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

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

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

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

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

Instances

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

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