{-# LANGUAGE CPP, NoImplicitPrelude #-}
module Data.Bitraversable.Compat (
#if MIN_VERSION_base(4,10,0)
module Base
, firstA
, secondA
#endif
) where
#if MIN_VERSION_base(4,10,0)
import Data.Bitraversable as Base
# if !MIN_VERSION_base(4,21,0)
import Prelude.Compat
# endif
# if !MIN_VERSION_base(4,21,0)
firstA :: Bitraversable t => Applicative f => (a -> f c) -> t a b -> f (t c b)
firstA :: forall (t :: * -> * -> *) (f :: * -> *) a c b.
(Bitraversable t, Applicative f) =>
(a -> f c) -> t a b -> f (t c b)
firstA a -> f c
f = (a -> f c) -> (b -> f b) -> t a b -> f (t c b)
forall (f :: * -> *) a c b d.
Applicative f =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f b
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
secondA :: Bitraversable t => Applicative f => (b -> f c) -> t a b -> f (t a c)
secondA :: forall (t :: * -> * -> *) (f :: * -> *) b c a.
(Bitraversable t, Applicative f) =>
(b -> f c) -> t a b -> f (t a c)
secondA b -> f c
f = (a -> f a) -> (b -> f c) -> t a b -> f (t a c)
forall (f :: * -> *) a c b d.
Applicative f =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f a
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure b -> f c
f
# endif
#endif