Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family Applicatives lst :: Constraint where ...
- type family Functors lst :: Constraint where ...
- fmap0 :: (a -> b) -> a -> b
- fmap1 :: Functor f => (a -> b) -> f a -> f b
- fmap2 :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b)
- fmap3 :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b))
- fmap4 :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b)))
- fmap5 :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b))))
- (.) :: Functor f1 => (a -> b) -> f1 a -> f1 b
- (.:) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b)
- (.:.) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b))
- (.::) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b)))
- (.::.) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b))))
- (∘) :: Functor f1 => (a -> b) -> f1 a -> f1 b
- (∘∘) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b)
- (∘∘∘) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b))
- (∘∘∘∘) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b)))
- (∘∘∘∘∘) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b))))
- (<<$>>) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b)
- (<<<$>>>) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b))
- (<<<<$>>>>) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b)))
- (<<<<<$>>>>>) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b))))
- (<<*>>) :: Applicatives '[f1, f2] => f2 (f1 (a -> b)) -> f2 (f1 a) -> f2 (f1 b)
- (<<<*>>>) :: Applicatives '[f1, f2, f3] => f3 (f2 (f1 (a -> b))) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b))
- (<<<<*>>>>) :: Applicatives '[f1, f2, f3, f4] => f4 (f3 (f2 (f1 (a -> b)))) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b)))
- (<<<<<*>>>>>) :: Applicatives '[f1, f2, f3, f4, f5] => f5 (f4 (f3 (f2 (f1 (a -> b))))) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b))))
- (|$) :: (a -> b) -> a -> (a, b)
- ($|) :: (a -> b) -> a -> (b, a)
- (<|$>) :: Functor f => (a -> b) -> f a -> f (a, b)
- (<$|>) :: Functor f => (a -> b) -> f a -> f (b, a)
- composed :: Iso' (f (g a)) (Compose f g a)
- nested :: (Functor f1, Functor f2) => (f2 (Compose f3 g1 a1) -> f1 (Compose f4 g2 a2)) -> f2 (f3 (g1 a1)) -> f1 (f4 (g2 a2))
- newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) :: forall k k1. (k -> Type) -> (k1 -> k) -> k1 -> Type = Compose {
- getCompose :: f (g a)
Documentation
type family Applicatives lst :: Constraint where ... Source #
Applicatives '[] = () | |
Applicatives (f ': fs) = (Applicative f, Applicatives fs) |
type family Functors lst :: Constraint where ... Source #
fmap4 :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) Source #
fmap5 :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) Source #
(.::) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixr 8 Source #
(.::.) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixr 8 Source #
(∘∘∘∘) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixr 8 Source #
(∘∘∘∘∘) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixr 8 Source #
(<<<$>>>) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixl 4 Source #
(<<<<$>>>>) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixl 4 Source #
(<<<<<$>>>>>) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixl 4 Source #
(<<*>>) :: Applicatives '[f1, f2] => f2 (f1 (a -> b)) -> f2 (f1 a) -> f2 (f1 b) infixl 4 Source #
(<<<*>>>) :: Applicatives '[f1, f2, f3] => f3 (f2 (f1 (a -> b))) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixl 4 Source #
(<<<<*>>>>) :: Applicatives '[f1, f2, f3, f4] => f4 (f3 (f2 (f1 (a -> b)))) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixl 4 Source #
(<<<<<*>>>>>) :: Applicatives '[f1, f2, f3, f4, f5] => f5 (f4 (f3 (f2 (f1 (a -> b))))) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixl 4 Source #
nested :: (Functor f1, Functor f2) => (f2 (Compose f3 g1 a1) -> f1 (Compose f4 g2 a2)) -> f2 (f3 (g1 a1)) -> f1 (f4 (g2 a2)) Source #
following functions are usefull when operating on nested structures with lenses, for example | given function foo :: a -> m (n a) and a lens l :: Lens' x a, we can use | nested l foo to get signature of x -> m (n x)
newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) :: forall k k1. (k -> Type) -> (k1 -> k) -> k1 -> Type infixr 9 #
Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.
Compose infixr 9 | |
|
Instances
Functor f => Generic1 (Compose f g :: k -> Type) | |
Sieve (ReifiedIndexedFold i) (Compose [] ((,) i)) | |
Defined in Control.Lens.Reified sieve :: ReifiedIndexedFold i a b -> a -> Compose [] ((,) i) b # | |
(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (i, j) (Compose f g) | |
Defined in Control.Lens.Indexed | |
(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (i, j) (Compose f g) | |
Defined in Control.Lens.Indexed ifoldMap :: Monoid m => ((i, j) -> a -> m) -> Compose f g a -> m # ifolded :: IndexedFold (i, j) (Compose f g a) a # ifoldr :: ((i, j) -> a -> b -> b) -> b -> Compose f g a -> b # ifoldl :: ((i, j) -> b -> a -> b) -> b -> Compose f g a -> b # ifoldr' :: ((i, j) -> a -> b -> b) -> b -> Compose f g a -> b # ifoldl' :: ((i, j) -> b -> a -> b) -> b -> Compose f g a -> b # | |
(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (i, j) (Compose f g) | |
Defined in Control.Lens.Indexed itraverse :: Applicative f0 => ((i, j) -> a -> f0 b) -> Compose f g a -> f0 (Compose f g b) # itraversed :: IndexedTraversal (i, j) (Compose f g a) (Compose f g b) a b # | |
(Functor f, Functor g) => Functor (Compose f g) | Since: base-4.9.0.0 |
(Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
(Foldable f, Foldable g) => Foldable (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose fold :: Monoid m => Compose f g m -> m # foldMap :: Monoid m => (a -> m) -> Compose f g a -> m # foldr :: (a -> b -> b) -> b -> Compose f g a -> b # foldr' :: (a -> b -> b) -> b -> Compose f g a -> b # foldl :: (b -> a -> b) -> b -> Compose f g a -> b # foldl' :: (b -> a -> b) -> b -> Compose f g a -> b # foldr1 :: (a -> a -> a) -> Compose f g a -> a # foldl1 :: (a -> a -> a) -> Compose f g a -> a # toList :: Compose f g a -> [a] # null :: Compose f g a -> Bool # length :: Compose f g a -> Int # elem :: Eq a => a -> Compose f g a -> Bool # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # | |
(Traversable f, Traversable g) => Traversable (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
(Functor f, Contravariant g) => Contravariant (Compose f g) | |
(Eq1 f, Eq1 g) => Eq1 (Compose f g) | Since: base-4.9.0.0 |
(Ord1 f, Ord1 g) => Ord1 (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
(Read1 f, Read1 g) => Read1 (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] # | |
(Show1 f, Show1 g) => Show1 (Compose f g) | Since: base-4.9.0.0 |
(Alternative f, Applicative g) => Alternative (Compose f g) | Since: base-4.9.0.0 |
(Settable f, Settable g) => Settable (Compose f g) | |
Defined in Control.Lens.Internal.Setter untainted :: Compose f g a -> a # untaintedDot :: Profunctor p => p a (Compose f g b) -> p a b # taintedDot :: Profunctor p => p a b -> p a (Compose f g b) # | |
(Traversable1 f, Traversable1 g) => Traversable1 (Compose f g) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) | Since: base-4.9.0.0 |
(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) # toConstr :: Compose f g a -> Constr # dataTypeOf :: Compose f g a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) # gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # | |
(Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # | |
(Read1 f, Read1 g, Read a) => Read (Compose f g a) | Since: base-4.9.0.0 |
(Show1 f, Show1 g, Show a) => Show (Compose f g a) | Since: base-4.9.0.0 |
Generic (Compose f g a) | |
Wrapped (Compose f g a) | |
t ~ Compose f' g' a' => Rewrapped (Compose f g a) t | |
Defined in Control.Lens.Wrapped | |
type Rep1 (Compose f g :: k -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
type Rep (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
type Unwrapped (Compose f g a) | |
Defined in Control.Lens.Wrapped |