-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Optics for hreader package
--   
--   Optics for hreader package
@package hreader-lens
@version 0.1.3.0


-- | Optic counterparts of MonadReader combinators from the lens library.
--   
--   |
module Control.Lens.HReader
hreader :: (MonadHReader m, HGettable (MHRElements m) s) => (s -> a) -> m a
hasks :: (MonadHReader m, HGettable (MHRElements m) s) => (s -> a) -> m a
hview :: (MonadHReader m, HGettable (MHRElements m) s) => Getting a s a -> m a
hviews :: (MonadHReader m, HGettable (MHRElements m) s) => LensLike' (Const r) s a -> (a -> r) -> m r
hiview :: (MonadHReader m, HGettable (MHRElements m) s) => IndexedGetting i (i, a) s a -> m (i, a)

-- | It actually semantically similar to a mix of hask and <tt>act</tt>,
--   performing the monadic action on <tt>s</tt> taken from the optic
--   composition on the left and <tt>r</tt> from HReader on the right. @
--   
--   type A = Int type B = Int
--   
--   data R = R { _baz :: B }
--   
--   makeLenses ''R
--   
--   foo :: IO Int foo = runHReaderT (HSCons (3::A) HSNil) f where f ::
--   HReaderT '[Int] IO B f = R 3 ^! baz . hperform g . baz g :: B -&gt; A
--   -&gt; HReaderT '[Int] IO R g = x y -&gt; pure (R (x * y)) @
hperform :: (MonadHReader m, HGettable (MHRElements m) r) => (s -> r -> m a) -> IndexPreservingAction m s a

-- | Flipped version of <a>hperform</a>
hperforml :: (MonadHReader m, HGettable (MHRElements m) r) => (r -> s -> m a) -> IndexPreservingAction m s a
