Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Reader.Reader
Synopsis
- reader :: (Rewrapped s s, Rewrapped t t, Rewrapped s' s', Rewrapped t' t', Unwrapped t ~ (a -> t'), Unwrapped s ~ (a' -> s')) => Iso s t (a' -> Unwrapped s') (a -> Unwrapped t')
- readerLens :: (Rewrapped s s, Rewrapped t t, Rewrapped s' s', Rewrapped t' t') => Iso (Unwrapped s -> Unwrapped t) (Unwrapped t' -> Unwrapped s') (s -> t) (t' -> s')
- pureReader :: forall (f :: Type -> Type) s t s' a. (Applicative f, Rewrapped s t, Rewrapped t s, Rewrapped s' s', Unwrapped s ~ (a -> s'), Unwrapped t ~ (a -> f (Unwrapped s'))) => s -> t
- homReader :: (Rewrapped s t, Rewrapped t s, Category cat, Unwrapped s ~ cat a b, Unwrapped t ~ cat a c) => cat b c -> s -> t
- star :: forall a b x (f :: Type -> Type) y x' (f' :: Type -> Type) y'. (Rewrapped a a, Rewrapped b b, Unwrapped a ~ (x -> f y), Unwrapped b ~ (x' -> f' y')) => Iso (Star f x y) (Star f' x' y') a b
- kleisli :: forall a b x (m :: Type -> Type) y x' (m' :: Type -> Type) y'. (Rewrapped a a, Rewrapped b b, Unwrapped a ~ (x -> m y), Unwrapped b ~ (x' -> m' y')) => Iso (Kleisli m x y) (Kleisli m' x' y') a b
- liftReader :: (Rewrapped s s, Rewrapped t t, Rewrapped a a, Rewrapped b b, Rewrapped s' s', Rewrapped t' t', Unwrapped s ~ (a'' -> Unwrapped s'), Unwrapped t ~ (a' -> Unwrapped t'), Unwrapped a ~ (a'' -> s'), Unwrapped b ~ (a' -> t')) => Iso s t a b
- reader' :: (Rewrapped s s, Rewrapped t t, Rewrapped a a, Rewrapped b b, Unwrapped a ~ Unwrapped s, Unwrapped b ~ Unwrapped t) => Iso s t a b
Documentation
reader :: (Rewrapped s s, Rewrapped t t, Rewrapped s' s', Rewrapped t' t', Unwrapped t ~ (a -> t'), Unwrapped s ~ (a' -> s')) => Iso s t (a' -> Unwrapped s') (a -> Unwrapped t') Source #
Iso (Reader a b) (Reader a' b') (a -> b) (a' -> b')
readerLens :: (Rewrapped s s, Rewrapped t t, Rewrapped s' s', Rewrapped t' t') => Iso (Unwrapped s -> Unwrapped t) (Unwrapped t' -> Unwrapped s') (s -> t) (t' -> s') Source #
Iso (LensLike f s t a b) (LensLike f' s' t' a' b') (ReaderT a f b -> ReaderT s f t) (ReaderT a' f b' -> ReaderT s' f t')
pureReader :: forall (f :: Type -> Type) s t s' a. (Applicative f, Rewrapped s t, Rewrapped t s, Rewrapped s' s', Unwrapped s ~ (a -> s'), Unwrapped t ~ (a -> f (Unwrapped s'))) => s -> t Source #
Applicative f => Reader a b -> ReaderT a f b
homReader :: (Rewrapped s t, Rewrapped t s, Category cat, Unwrapped s ~ cat a b, Unwrapped t ~ cat a c) => cat b c -> s -> t Source #
(forall x. f x -> g x) -> ReaderT a f b -> ReaderT a g b
star :: forall a b x (f :: Type -> Type) y x' (f' :: Type -> Type) y'. (Rewrapped a a, Rewrapped b b, Unwrapped a ~ (x -> f y), Unwrapped b ~ (x' -> f' y')) => Iso (Star f x y) (Star f' x' y') a b Source #
Iso (Star f a b) (Star f' a' b') (ReaderT a f b) (ReaderT a' f' b')
kleisli :: forall a b x (m :: Type -> Type) y x' (m' :: Type -> Type) y'. (Rewrapped a a, Rewrapped b b, Unwrapped a ~ (x -> m y), Unwrapped b ~ (x' -> m' y')) => Iso (Kleisli m x y) (Kleisli m' x' y') a b Source #
Iso (Kleisli f a b) (Kleisli f' a' b') (ReaderT a f b) (ReaderT a' f' b')
liftReader :: (Rewrapped s s, Rewrapped t t, Rewrapped a a, Rewrapped b b, Rewrapped s' s', Rewrapped t' t', Unwrapped s ~ (a'' -> Unwrapped s'), Unwrapped t ~ (a' -> Unwrapped t'), Unwrapped a ~ (a'' -> s'), Unwrapped b ~ (a' -> t')) => Iso s t a b Source #
Iso (ReaderT a f b) (ReaderT a' f' b') (Reader a (f b)) (Reader a' (f' b'))