ContentsIndex
Org.Org.Semantic.HBase.Category.MonadPlus
Description
This includes some ideas from
Synopsis
class Monad m => MonadZero m where
mzero :: m a
assert :: MonadZero m => Bool -> m ()
mFetchJust :: MonadZero m => Maybe a -> m a
class MonadZero m => MonadOr m where
morelse :: m a -> m a -> m a
(|||) :: MonadOr m => m a -> m a -> m a
mnot :: MonadOr m => m a -> m ()
mOptional :: MonadOr m => m a -> m (Maybe a)
mZeroOrMore :: MonadOr m => m a -> m [a]
mOneOrMore :: MonadOr m => m a -> m [a]
mOneOrMoreWithSeparator :: MonadOr m => m a -> m b -> m [a]
mZeroOrMoreWithSeparator :: MonadOr m => m a -> m b -> m [a]
class MonadOr m => MonadPlus m where
mplus :: m a -> m a -> m a
msum :: [m a] -> m a
returnMany :: [a] -> m a
(+++) :: MonadPlus m => m a -> m a -> m a
mConcatZeroOrMore :: (MonadOr m, MonadPlus n) => m (n a) -> m (n a)
mConcatOneOrMore :: (MonadOr m, MonadPlus n) => m (n a) -> m (n a)
class MonadPlus m => MonadFirst m where
mfirst :: m a -> m a
Documentation
class Monad m => MonadZero m where
Methods
mzero :: m a
Instances
MonadZero m => MonadZero (Contextual m context)
MonadZero m => MonadZero (ExceptionMonad m ex)
MonadZero Maybe
MonadZero []
Monad m => MonadZero (OrMonad m)
Monad m => MonadZero (PlusMonad m)
(Monad m, MonadZero n, ExtractableFunctor n) => MonadZero (StackedMonad m n)
MonadZero m => MonadZero (StateMonad m state)
??? a m t => MonadZero (LiftedListParser m t a)
??? a m t => MonadZero (LookaheadListParser m t a)
Monad m => MonadZero (MonadPossible m [t])
Monad m => MonadZero (MonadPossible m [t])
assert :: MonadZero m => Bool -> m ()
mFetchJust :: MonadZero m => Maybe a -> m a
class MonadZero m => MonadOr m where
Methods
morelse :: m a -> m a -> m a
must satisfy morelse (return a) b = (return a)
Instances
MonadOr m => MonadOr (Contextual m context)
MonadOr m => MonadOr (ExceptionMonad m ex)
MonadOr Maybe
MonadOr []
Monad m => MonadOr (OrMonad m)
Monad m => MonadOr (PlusMonad m)
(Monad m, MonadOr n, ExtractableFunctor n) => MonadOr (StackedMonad m n)
MonadOr m => MonadOr (StateMonad m state)
??? a m t => MonadOr (LiftedListParser m t a)
??? a m t => MonadOr (LookaheadListParser m t a)
Monad m => MonadOr (MonadPossible m [t])
Monad m => MonadOr (MonadPossible m [t])
(|||) :: MonadOr m => m a -> m a -> m a
same as morelse
mnot :: MonadOr m => m a -> m ()
mOptional :: MonadOr m => m a -> m (Maybe a)
mZeroOrMore :: MonadOr m => m a -> m [a]
mOneOrMore :: MonadOr m => m a -> m [a]
mOneOrMoreWithSeparator :: MonadOr m => m a -> m b -> m [a]
mZeroOrMoreWithSeparator :: MonadOr m => m a -> m b -> m [a]
class MonadOr m => MonadPlus m where
Methods
mplus :: m a -> m a -> m a
must satisfy (mplus a b) >>= c = mplus (a >>= c) (b >>= c)
msum :: [m a] -> m a
returnMany :: [a] -> m a
Instances
MonadPlus m => MonadPlus (Contextual m context)
MonadPlus m => MonadPlus (ExceptionMonad m ex)
MonadPlus []
Monad m => MonadPlus (PlusMonad m)
(Monad m, MonadPlus n, ExtractableFunctor n) => MonadPlus (StackedMonad m n)
MonadPlus m => MonadPlus (StateMonad m state)
??? a m t => MonadPlus (LiftedListParser m t a)
??? a m t => MonadPlus (LookaheadListParser m t a)
Monad m => MonadPlus (MonadPossible m [t])
(+++) :: MonadPlus m => m a -> m a -> m a
same as mplus
mConcatZeroOrMore :: (MonadOr m, MonadPlus n) => m (n a) -> m (n a)
mConcatOneOrMore :: (MonadOr m, MonadPlus n) => m (n a) -> m (n a)
class MonadPlus m => MonadFirst m where
Methods
mfirst :: m a -> m a
must satisfy mfirst (mplus a b) = mfirst a
Instances
MonadFirst m => MonadFirst (Contextual m context)
MonadFirst []
Monad m => MonadFirst (PlusMonad m)
(Monad m, MonadFirst n, ExtractableFunctor n) => MonadFirst (StackedMonad m n)
MonadFirst m => MonadFirst (StateMonad m state)
??? a m t => MonadFirst (LiftedListParser m t a)
??? a m t => MonadFirst (LookaheadListParser m t a)
Monad m => MonadFirst (MonadPossible m [t])
Produced by Haddock version 0.6