Safe Haskell | None |
---|---|
Language | Haskell2010 |
Darcs.Util.IndexedMonad
Synopsis
- class Monad (m :: Type -> Type -> Type -> Type) where
- class LiftIx (t :: (Type -> Type) -> Type -> Type -> Type -> Type) where
- liftIx :: m a -> t m i i a
- when :: Monad m => Bool -> m i i () -> m i i ()
- ifThenElse :: Bool -> a -> a -> a
- class Monad m => MonadReader r (m :: Type -> Type -> Type -> Type) | m -> r where
- newtype ReaderT r (m :: Type -> Type -> Type -> Type) i j a = ReaderT {
- runReaderT :: r -> m i j a
- asks :: MonadReader r m => (r -> a) -> m i i a
Documentation
class Monad (m :: Type -> Type -> Type -> Type) where #
An alternative monad class, indexed by a "from" and "to" state.
class LiftIx (t :: (Type -> Type) -> Type -> Type -> Type -> Type) where #
A class for indexed monad transformers, going from normal Haskell monads into our indexed monads.
ifThenElse :: Bool -> a -> a -> a #
class Monad m => MonadReader r (m :: Type -> Type -> Type -> Type) | m -> r where #
An indexed version of the standard MonadReader
class
newtype ReaderT r (m :: Type -> Type -> Type -> Type) i j a #
An indexed version of the standard ReaderT
transformer
Constructors
ReaderT | |
Fields
|
asks :: MonadReader r m => (r -> a) -> m i i a #