Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Monad.HReader
Synopsis
- newtype HReaderT (els :: [Type]) (m :: Type -> Type) a = HReaderT {
- unHReaderT :: ReaderT (HSet els) m a
- runHReaderT :: forall (els :: [Type]) m a. HSet els -> HReaderT els m a -> m a
- subHSetHReaderT :: forall (m :: Type -> Type) (els :: [Type]) (subels :: [Type]) a. (Monad m, Applicative m, SubHSettable els subels) => HReaderT subels m a -> HReaderT els m a
- narrowHReaderT :: forall (m :: Type -> Type) (els :: [Type]) (subels :: [Type]) proxy a. (Monad m, Applicative m, SubHSettable els subels) => proxy subels -> HReaderT subels m a -> HReaderT els m a
- module Control.Monad.HReader.Class
Documentation
newtype HReaderT (els :: [Type]) (m :: Type -> Type) a Source #
Constructors
HReaderT | |
Fields
|
Instances
subHSetHReaderT :: forall (m :: Type -> Type) (els :: [Type]) (subels :: [Type]) a. (Monad m, Applicative m, SubHSettable els subels) => HReaderT subels m a -> HReaderT els m a Source #
Run a local reader with a subset of HSet elements.
narrowHReaderT :: forall (m :: Type -> Type) (els :: [Type]) (subels :: [Type]) proxy a. (Monad m, Applicative m, SubHSettable els subels) => proxy subels -> HReaderT subels m a -> HReaderT els m a Source #
Convenient variant of subHSetHReaderT
with proxy type to make it
posible to run nested HReaderT in place without complex type
declarations, e.g.
narrowHReaderT (Proxy :: Proxy '[String, Int]) $ do doThingsWithString doThingsWithInt doThingsWithOtherStuff -- < this will not compile
module Control.Monad.HReader.Class