{-# LANGUAGE DerivingVia #-}
module Data.HBifunctor (
HBifunctor(..)
, WrappedHBifunctor(..)
, overHBifunctor
, LeftF(..)
, RightF(..)
) where
import Control.Natural.IsoF
import Data.Biapplicative
import Data.Bifunctor.TH
import Data.Coerce
import Data.Data
import Data.Deriving
import Data.HFunctor
import Data.HFunctor.HTraversable
import Data.HFunctor.Internal
import Data.HFunctor.Interpret
import GHC.Generics
overHBifunctor
:: HBifunctor t
=> (f <~> f')
-> (g <~> g')
-> t f g <~> t f' g'
overHBifunctor :: forall {k} (t :: (k -> *) -> (k -> *) -> k -> *) (f :: k -> *)
(f' :: k -> *) (g :: k -> *) (g' :: k -> *).
HBifunctor t =>
(f <~> f') -> (g <~> g') -> t f g <~> t f' g'
overHBifunctor f <~> f'
f g <~> g'
g =
forall {k} (f :: k -> *) (g :: k -> *).
(f ~> g) -> (g ~> f) -> f <~> g
isoF (forall k (t :: (k -> *) -> (k -> *) -> k -> *) (f :: k -> *)
(j :: k -> *) (g :: k -> *) (l :: k -> *).
HBifunctor t =>
(f ~> j) -> (g ~> l) -> t f g ~> t j l
hbimap (forall {k} (f :: k -> *) (g :: k -> *). (f <~> g) -> f ~> g
viewF f <~> f'
f) (forall {k} (f :: k -> *) (g :: k -> *). (f <~> g) -> f ~> g
viewF g <~> g'
g))
(forall k (t :: (k -> *) -> (k -> *) -> k -> *) (f :: k -> *)
(j :: k -> *) (g :: k -> *) (l :: k -> *).
HBifunctor t =>
(f ~> j) -> (g ~> l) -> t f g ~> t j l
hbimap (forall {k} (f :: k -> *) (g :: k -> *). (f <~> g) -> g ~> f
reviewF f <~> f'
f) (forall {k} (f :: k -> *) (g :: k -> *). (f <~> g) -> g ~> f
reviewF g <~> g'
g))
newtype LeftF f g a = LeftF { forall {k} {k} (f :: k -> *) (g :: k) (a :: k). LeftF f g a -> f a
runLeftF :: f a }
deriving (Int -> LeftF f g a -> ShowS
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
Int -> LeftF f g a -> ShowS
forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
[LeftF f g a] -> ShowS
forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
LeftF f g a -> String
showList :: [LeftF f g a] -> ShowS
$cshowList :: forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
[LeftF f g a] -> ShowS
show :: LeftF f g a -> String
$cshow :: forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
LeftF f g a -> String
showsPrec :: Int -> LeftF f g a -> ShowS
$cshowsPrec :: forall k (f :: k -> *) k (g :: k) (a :: k).
Show (f a) =>
Int -> LeftF f g a -> ShowS
Show, ReadPrec [LeftF f g a]
ReadPrec (LeftF f g a)
ReadS [LeftF f g a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadPrec [LeftF f g a]
forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadPrec (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
Int -> ReadS (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadS [LeftF f g a]
readListPrec :: ReadPrec [LeftF f g a]
$creadListPrec :: forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadPrec [LeftF f g a]
readPrec :: ReadPrec (LeftF f g a)
$creadPrec :: forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadPrec (LeftF f g a)
readList :: ReadS [LeftF f g a]
$creadList :: forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
ReadS [LeftF f g a]
readsPrec :: Int -> ReadS (LeftF f g a)
$creadsPrec :: forall k (f :: k -> *) k (g :: k) (a :: k).
Read (f a) =>
Int -> ReadS (LeftF f g a)
Read, LeftF f g a -> LeftF f g a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall k (f :: k -> *) k (g :: k) (a :: k).
Eq (f a) =>
LeftF f g a -> LeftF f g a -> Bool
/= :: LeftF f g a -> LeftF f g a -> Bool
$c/= :: forall k (f :: k -> *) k (g :: k) (a :: k).
Eq (f a) =>
LeftF f g a -> LeftF f g a -> Bool
== :: LeftF f g a -> LeftF f g a -> Bool
$c== :: forall k (f :: k -> *) k (g :: k) (a :: k).
Eq (f a) =>
LeftF f g a -> LeftF f g a -> Bool
Eq, LeftF f g a -> LeftF f g a -> Bool
LeftF f g a -> LeftF f g a -> Ordering
LeftF f g a -> LeftF f g a -> LeftF f g a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {k} {f :: k -> *} {k} {g :: k} {a :: k}.
Ord (f a) =>
Eq (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Bool
forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Ordering
forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> LeftF f g a
min :: LeftF f g a -> LeftF f g a -> LeftF f g a
$cmin :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> LeftF f g a
max :: LeftF f g a -> LeftF f g a -> LeftF f g a
$cmax :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> LeftF f g a
>= :: LeftF f g a -> LeftF f g a -> Bool
$c>= :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Bool
> :: LeftF f g a -> LeftF f g a -> Bool
$c> :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Bool
<= :: LeftF f g a -> LeftF f g a -> Bool
$c<= :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Bool
< :: LeftF f g a -> LeftF f g a -> Bool
$c< :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Bool
compare :: LeftF f g a -> LeftF f g a -> Ordering
$ccompare :: forall k (f :: k -> *) k (g :: k) (a :: k).
Ord (f a) =>
LeftF f g a -> LeftF f g a -> Ordering
Ord, forall a b. a -> LeftF f g b -> LeftF f g a
forall a b. (a -> b) -> LeftF f g a -> LeftF f g b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
forall (f :: * -> *) k (g :: k) a b.
Functor f =>
a -> LeftF f g b -> LeftF f g a
forall (f :: * -> *) k (g :: k) a b.
Functor f =>
(a -> b) -> LeftF f g a -> LeftF f g b
<$ :: forall a b. a -> LeftF f g b -> LeftF f g a
$c<$ :: forall (f :: * -> *) k (g :: k) a b.
Functor f =>
a -> LeftF f g b -> LeftF f g a
fmap :: forall a b. (a -> b) -> LeftF f g a -> LeftF f g b
$cfmap :: forall (f :: * -> *) k (g :: k) a b.
Functor f =>
(a -> b) -> LeftF f g a -> LeftF f g b
Functor, forall a. Eq a => a -> LeftF f g a -> Bool
forall a. Num a => LeftF f g a -> a
forall a. Ord a => LeftF f g a -> a
forall m. Monoid m => LeftF f g m -> m
forall a. LeftF f g a -> Bool
forall a. LeftF f g a -> Int
forall a. LeftF f g a -> [a]
forall a. (a -> a -> a) -> LeftF f g a -> a
forall m a. Monoid m => (a -> m) -> LeftF f g a -> m
forall b a. (b -> a -> b) -> b -> LeftF f g a -> b
forall a b. (a -> b -> b) -> b -> LeftF f g a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
forall (f :: * -> *) k (g :: k) a.
(Foldable f, Eq a) =>
a -> LeftF f g a -> Bool
forall (f :: * -> *) k (g :: k) a.
(Foldable f, Num a) =>
LeftF f g a -> a
forall (f :: * -> *) k (g :: k) a.
(Foldable f, Ord a) =>
LeftF f g a -> a
forall (f :: * -> *) k (g :: k) m.
(Foldable f, Monoid m) =>
LeftF f g m -> m
forall (f :: * -> *) k (g :: k) a.
Foldable f =>
LeftF f g a -> Bool
forall (f :: * -> *) k (g :: k) a. Foldable f => LeftF f g a -> Int
forall (f :: * -> *) k (g :: k) a. Foldable f => LeftF f g a -> [a]
forall (f :: * -> *) k (g :: k) a.
Foldable f =>
(a -> a -> a) -> LeftF f g a -> a
forall (f :: * -> *) k (g :: k) m a.
(Foldable f, Monoid m) =>
(a -> m) -> LeftF f g a -> m
forall (f :: * -> *) k (g :: k) b a.
Foldable f =>
(b -> a -> b) -> b -> LeftF f g a -> b
forall (f :: * -> *) k (g :: k) a b.
Foldable f =>
(a -> b -> b) -> b -> LeftF f g a -> b
product :: forall a. Num a => LeftF f g a -> a
$cproduct :: forall (f :: * -> *) k (g :: k) a.
(Foldable f, Num a) =>
LeftF f g a -> a
sum :: forall a. Num a => LeftF f g a -> a
$csum :: forall (f :: * -> *) k (g :: k) a.
(Foldable f, Num a) =>
LeftF f g a -> a
minimum :: forall a. Ord a => LeftF f g a -> a
$cminimum :: forall (f :: * -> *) k (g :: k) a.
(Foldable f, Ord a) =>
LeftF f g a -> a
maximum :: forall a. Ord a => LeftF f g a -> a
$cmaximum :: forall (f :: * -> *) k (g :: k) a.
(Foldable f, Ord a) =>
LeftF f g a -> a
elem :: forall a. Eq a => a -> LeftF f g a -> Bool
$celem :: forall (f :: * -> *) k (g :: k) a.
(Foldable f, Eq a) =>
a -> LeftF f g a -> Bool
length :: forall a. LeftF f g a -> Int
$clength :: forall (f :: * -> *) k (g :: k) a. Foldable f => LeftF f g a -> Int
null :: forall a. LeftF f g a -> Bool
$cnull :: forall (f :: * -> *) k (g :: k) a.
Foldable f =>
LeftF f g a -> Bool
toList :: forall a. LeftF f g a -> [a]
$ctoList :: forall (f :: * -> *) k (g :: k) a. Foldable f => LeftF f g a -> [a]
foldl1 :: forall a. (a -> a -> a) -> LeftF f g a -> a
$cfoldl1 :: forall (f :: * -> *) k (g :: k) a.
Foldable f =>
(a -> a -> a) -> LeftF f g a -> a
foldr1 :: forall a. (a -> a -> a) -> LeftF f g a -> a
$cfoldr1 :: forall (f :: * -> *) k (g :: k) a.
Foldable f =>
(a -> a -> a) -> LeftF f g a -> a
foldl' :: forall b a. (b -> a -> b) -> b -> LeftF f g a -> b
$cfoldl' :: forall (f :: * -> *) k (g :: k) b a.
Foldable f =>
(b -> a -> b) -> b -> LeftF f g a -> b
foldl :: forall b a. (b -> a -> b) -> b -> LeftF f g a -> b
$cfoldl :: forall (f :: * -> *) k (g :: k) b a.
Foldable f =>
(b -> a -> b) -> b -> LeftF f g a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> LeftF f g a -> b
$cfoldr' :: forall (f :: * -> *) k (g :: k) a b.
Foldable f =>
(a -> b -> b) -> b -> LeftF f g a -> b
foldr :: forall a b. (a -> b -> b) -> b -> LeftF f g a -> b
$cfoldr :: forall (f :: * -> *) k (g :: k) a b.
Foldable f =>
(a -> b -> b) -> b -> LeftF f g a -> b
foldMap' :: forall m a. Monoid m => (a -> m) -> LeftF f g a -> m
$cfoldMap' :: forall (f :: * -> *) k (g :: k) m a.
(Foldable f, Monoid m) =>
(a -> m) -> LeftF f g a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> LeftF f g a -> m
$cfoldMap :: forall (f :: * -> *) k (g :: k) m a.
(Foldable f, Monoid m) =>
(a -> m) -> LeftF f g a -> m
fold :: forall m. Monoid m => LeftF f g m -> m
$cfold :: forall (f :: * -> *) k (g :: k) m.
(Foldable f, Monoid m) =>
LeftF f g m -> m
Foldable, forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall {f :: * -> *} {k} {g :: k}.
Traversable f =>
Functor (LeftF f g)
forall {f :: * -> *} {k} {g :: k}.
Traversable f =>
Foldable (LeftF f g)
forall (f :: * -> *) k (g :: k) (m :: * -> *) a.
(Traversable f, Monad m) =>
LeftF f g (m a) -> m (LeftF f g a)
forall (f :: * -> *) k (g :: k) (f :: * -> *) a.
(Traversable f, Applicative f) =>
LeftF f g (f a) -> f (LeftF f g a)
forall (f :: * -> *) k (g :: k) (m :: * -> *) a b.
(Traversable f, Monad m) =>
(a -> m b) -> LeftF f g a -> m (LeftF f g b)
forall (f :: * -> *) k (g :: k) (f :: * -> *) a b.
(Traversable f, Applicative f) =>
(a -> f b) -> LeftF f g a -> f (LeftF f g b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> LeftF f g a -> f (LeftF f g b)
sequence :: forall (m :: * -> *) a.
Monad m =>
LeftF f g (m a) -> m (LeftF f g a)
$csequence :: forall (f :: * -> *) k (g :: k) (m :: * -> *) a.
(Traversable f, Monad m) =>
LeftF f g (m a) -> m (LeftF f g a)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> LeftF f g a -> m (LeftF f g b)
$cmapM :: forall (f :: * -> *) k (g :: k) (m :: * -> *) a b.
(Traversable f, Monad m) =>
(a -> m b) -> LeftF f g a -> m (LeftF f g b)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
LeftF f g (f a) -> f (LeftF f g a)
$csequenceA :: forall (f :: * -> *) k (g :: k) (f :: * -> *) a.
(Traversable f, Applicative f) =>
LeftF f g (f a) -> f (LeftF f g a)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> LeftF f g a -> f (LeftF f g b)
$ctraverse :: forall (f :: * -> *) k (g :: k) (f :: * -> *) a b.
(Traversable f, Applicative f) =>
(a -> f b) -> LeftF f g a -> f (LeftF f g b)
Traversable, Typeable, forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall k (f :: k -> *) k (g :: k) (a :: k) x.
Rep (LeftF f g a) x -> LeftF f g a
forall k (f :: k -> *) k (g :: k) (a :: k) x.
LeftF f g a -> Rep (LeftF f g a) x
$cto :: forall k (f :: k -> *) k (g :: k) (a :: k) x.
Rep (LeftF f g a) x -> LeftF f g a
$cfrom :: forall k (f :: k -> *) k (g :: k) (a :: k) x.
LeftF f g a -> Rep (LeftF f g a) x
Generic, LeftF f g a -> DataType
LeftF f g a -> Constr
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall {k} {f :: k -> *} {k} {g :: k} {a :: k}.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
Typeable (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
LeftF f g a -> DataType
forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
LeftF f g a -> Constr
forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall b. Data b => b -> b) -> LeftF f g a -> LeftF f g a
forall k (f :: k -> *) k (g :: k) (a :: k) u.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
Int -> (forall d. Data d => d -> u) -> LeftF f g a -> u
forall k (f :: k -> *) k (g :: k) (a :: k) u.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall d. Data d => d -> u) -> LeftF f g a -> [u]
forall k (f :: k -> *) k (g :: k) (a :: k) r r'.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
forall k (f :: k -> *) k (g :: k) (a :: k) r r'.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
forall k (f :: k -> *) k (g :: k) (a :: k) (m :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Monad m) =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k) (m :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k) (c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k) (c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LeftF f g a -> c (LeftF f g a)
forall k (f :: k -> *) k (g :: k) (a :: k) (t :: * -> *)
(c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (LeftF f g a))
forall k (f :: k -> *) k (g :: k) (a :: k) (t :: * -> * -> *)
(c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LeftF f g a))
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LeftF f g a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LeftF f g a -> c (LeftF f g a)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
$cgmapMo :: forall k (f :: k -> *) k (g :: k) (a :: k) (m :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
$cgmapMp :: forall k (f :: k -> *) k (g :: k) (a :: k) (m :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
$cgmapM :: forall k (f :: k -> *) k (g :: k) (a :: k) (m :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Monad m) =>
(forall d. Data d => d -> m d) -> LeftF f g a -> m (LeftF f g a)
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LeftF f g a -> u
$cgmapQi :: forall k (f :: k -> *) k (g :: k) (a :: k) u.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
Int -> (forall d. Data d => d -> u) -> LeftF f g a -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> LeftF f g a -> [u]
$cgmapQ :: forall k (f :: k -> *) k (g :: k) (a :: k) u.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall d. Data d => d -> u) -> LeftF f g a -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
$cgmapQr :: forall k (f :: k -> *) k (g :: k) (a :: k) r r'.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
$cgmapQl :: forall k (f :: k -> *) k (g :: k) (a :: k) r r'.
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LeftF f g a -> r
gmapT :: (forall b. Data b => b -> b) -> LeftF f g a -> LeftF f g a
$cgmapT :: forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall b. Data b => b -> b) -> LeftF f g a -> LeftF f g a
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LeftF f g a))
$cdataCast2 :: forall k (f :: k -> *) k (g :: k) (a :: k) (t :: * -> * -> *)
(c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LeftF f g a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (LeftF f g a))
$cdataCast1 :: forall k (f :: k -> *) k (g :: k) (a :: k) (t :: * -> *)
(c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a), Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (LeftF f g a))
dataTypeOf :: LeftF f g a -> DataType
$cdataTypeOf :: forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
LeftF f g a -> DataType
toConstr :: LeftF f g a -> Constr
$ctoConstr :: forall k (f :: k -> *) k (g :: k) (a :: k).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
LeftF f g a -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LeftF f g a)
$cgunfold :: forall k (f :: k -> *) k (g :: k) (a :: k) (c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LeftF f g a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LeftF f g a -> c (LeftF f g a)
$cgfoldl :: forall k (f :: k -> *) k (g :: k) (a :: k) (c :: * -> *).
(Typeable g, Typeable a, Typeable f, Typeable k, Typeable k,
Data (f a)) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LeftF f g a -> c (LeftF f g a)
Data)
deriveShow1 ''LeftF
deriveRead1 ''LeftF
deriveEq1 ''LeftF
deriveOrd1 ''LeftF
deriveBifunctor ''LeftF
deriveBifoldable ''LeftF
deriveBitraversable ''LeftF
instance Applicative f => Biapplicative (LeftF f) where
bipure :: forall a b. a -> b -> LeftF f a b
bipure a
_ b
y = forall {k} {k} (f :: k -> *) (g :: k) (a :: k). f a -> LeftF f g a
LeftF (forall (f :: * -> *) a. Applicative f => a -> f a
pure b
y)
LeftF f (c -> d)
x <<*>> :: forall a b c d.
LeftF f (a -> b) (c -> d) -> LeftF f a c -> LeftF f b d
<<*>> LeftF f c
y = forall {k} {k} (f :: k -> *) (g :: k) (a :: k). f a -> LeftF f g a
LeftF (f (c -> d)
x forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> f c
y)
instance HBifunctor LeftF where
hbimap :: forall (f :: k -> *) (j :: k -> *) (g :: k -> *) (l :: k -> *).
(f ~> j) -> (g ~> l) -> LeftF f g ~> LeftF j l
hbimap f ~> j
f g ~> l
_ (LeftF f x
x) = forall {k} {k} (f :: k -> *) (g :: k) (a :: k). f a -> LeftF f g a
LeftF (f ~> j
f f x
x)
instance HFunctor (LeftF f) where
hmap :: forall (f :: k -> *) (g :: k -> *).
(f ~> g) -> LeftF f f ~> LeftF f g
hmap f ~> g
_ = coerce :: forall a b. Coercible a b => a -> b
coerce
instance HTraversable (LeftF f) where
htraverse :: forall (h :: * -> *) (f :: k -> *) (g :: k -> *) (a :: k1).
Applicative h =>
(forall (x :: k). f x -> h (g x)) -> LeftF f f a -> h (LeftF f g a)
htraverse forall (x :: k). f x -> h (g x)
_ = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall b c a. (b -> c) -> (a -> b) -> a -> c
. coerce :: forall a b. Coercible a b => a -> b
coerce
newtype RightF f g a = RightF { forall {k} {k} (f :: k) (g :: k -> *) (a :: k). RightF f g a -> g a
runRightF :: g a }
deriving (Int -> RightF f g a -> ShowS
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
Int -> RightF f g a -> ShowS
forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
[RightF f g a] -> ShowS
forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
RightF f g a -> String
showList :: [RightF f g a] -> ShowS
$cshowList :: forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
[RightF f g a] -> ShowS
show :: RightF f g a -> String
$cshow :: forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
RightF f g a -> String
showsPrec :: Int -> RightF f g a -> ShowS
$cshowsPrec :: forall k (f :: k) k (g :: k -> *) (a :: k).
Show (g a) =>
Int -> RightF f g a -> ShowS
Show, ReadPrec [RightF f g a]
ReadPrec (RightF f g a)
ReadS [RightF f g a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadPrec [RightF f g a]
forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadPrec (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
Int -> ReadS (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadS [RightF f g a]
readListPrec :: ReadPrec [RightF f g a]
$creadListPrec :: forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadPrec [RightF f g a]
readPrec :: ReadPrec (RightF f g a)
$creadPrec :: forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadPrec (RightF f g a)
readList :: ReadS [RightF f g a]
$creadList :: forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
ReadS [RightF f g a]
readsPrec :: Int -> ReadS (RightF f g a)
$creadsPrec :: forall k (f :: k) k (g :: k -> *) (a :: k).
Read (g a) =>
Int -> ReadS (RightF f g a)
Read, RightF f g a -> RightF f g a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall k (f :: k) k (g :: k -> *) (a :: k).
Eq (g a) =>
RightF f g a -> RightF f g a -> Bool
/= :: RightF f g a -> RightF f g a -> Bool
$c/= :: forall k (f :: k) k (g :: k -> *) (a :: k).
Eq (g a) =>
RightF f g a -> RightF f g a -> Bool
== :: RightF f g a -> RightF f g a -> Bool
$c== :: forall k (f :: k) k (g :: k -> *) (a :: k).
Eq (g a) =>
RightF f g a -> RightF f g a -> Bool
Eq, RightF f g a -> RightF f g a -> Bool
RightF f g a -> RightF f g a -> Ordering
RightF f g a -> RightF f g a -> RightF f g a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {k} {f :: k} {k} {g :: k -> *} {a :: k}.
Ord (g a) =>
Eq (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Bool
forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Ordering
forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> RightF f g a
min :: RightF f g a -> RightF f g a -> RightF f g a
$cmin :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> RightF f g a
max :: RightF f g a -> RightF f g a -> RightF f g a
$cmax :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> RightF f g a
>= :: RightF f g a -> RightF f g a -> Bool
$c>= :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Bool
> :: RightF f g a -> RightF f g a -> Bool
$c> :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Bool
<= :: RightF f g a -> RightF f g a -> Bool
$c<= :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Bool
< :: RightF f g a -> RightF f g a -> Bool
$c< :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Bool
compare :: RightF f g a -> RightF f g a -> Ordering
$ccompare :: forall k (f :: k) k (g :: k -> *) (a :: k).
Ord (g a) =>
RightF f g a -> RightF f g a -> Ordering
Ord, forall k (f :: k) (g :: * -> *) a b.
Functor g =>
a -> RightF f g b -> RightF f g a
forall k (f :: k) (g :: * -> *) a b.
Functor g =>
(a -> b) -> RightF f g a -> RightF f g b
forall a b. a -> RightF f g b -> RightF f g a
forall a b. (a -> b) -> RightF f g a -> RightF f g b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: forall a b. a -> RightF f g b -> RightF f g a
$c<$ :: forall k (f :: k) (g :: * -> *) a b.
Functor g =>
a -> RightF f g b -> RightF f g a
fmap :: forall a b. (a -> b) -> RightF f g a -> RightF f g b
$cfmap :: forall k (f :: k) (g :: * -> *) a b.
Functor g =>
(a -> b) -> RightF f g a -> RightF f g b
Functor, forall a. Eq a => a -> RightF f g a -> Bool
forall a. Num a => RightF f g a -> a
forall a. Ord a => RightF f g a -> a
forall m. Monoid m => RightF f g m -> m
forall a. RightF f g a -> Bool
forall a. RightF f g a -> Int
forall a. RightF f g a -> [a]
forall a. (a -> a -> a) -> RightF f g a -> a
forall k (f :: k) (g :: * -> *) a.
(Foldable g, Eq a) =>
a -> RightF f g a -> Bool
forall k (f :: k) (g :: * -> *) a.
(Foldable g, Num a) =>
RightF f g a -> a
forall k (f :: k) (g :: * -> *) a.
(Foldable g, Ord a) =>
RightF f g a -> a
forall k (f :: k) (g :: * -> *) m.
(Foldable g, Monoid m) =>
RightF f g m -> m
forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> Bool
forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> Int
forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> [a]
forall k (f :: k) (g :: * -> *) a.
Foldable g =>
(a -> a -> a) -> RightF f g a -> a
forall k (f :: k) (g :: * -> *) m a.
(Foldable g, Monoid m) =>
(a -> m) -> RightF f g a -> m
forall k (f :: k) (g :: * -> *) b a.
Foldable g =>
(b -> a -> b) -> b -> RightF f g a -> b
forall k (f :: k) (g :: * -> *) a b.
Foldable g =>
(a -> b -> b) -> b -> RightF f g a -> b
forall m a. Monoid m => (a -> m) -> RightF f g a -> m
forall b a. (b -> a -> b) -> b -> RightF f g a -> b
forall a b. (a -> b -> b) -> b -> RightF f g a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: forall a. Num a => RightF f g a -> a
$cproduct :: forall k (f :: k) (g :: * -> *) a.
(Foldable g, Num a) =>
RightF f g a -> a
sum :: forall a. Num a => RightF f g a -> a
$csum :: forall k (f :: k) (g :: * -> *) a.
(Foldable g, Num a) =>
RightF f g a -> a
minimum :: forall a. Ord a => RightF f g a -> a
$cminimum :: forall k (f :: k) (g :: * -> *) a.
(Foldable g, Ord a) =>
RightF f g a -> a
maximum :: forall a. Ord a => RightF f g a -> a
$cmaximum :: forall k (f :: k) (g :: * -> *) a.
(Foldable g, Ord a) =>
RightF f g a -> a
elem :: forall a. Eq a => a -> RightF f g a -> Bool
$celem :: forall k (f :: k) (g :: * -> *) a.
(Foldable g, Eq a) =>
a -> RightF f g a -> Bool
length :: forall a. RightF f g a -> Int
$clength :: forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> Int
null :: forall a. RightF f g a -> Bool
$cnull :: forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> Bool
toList :: forall a. RightF f g a -> [a]
$ctoList :: forall k (f :: k) (g :: * -> *) a.
Foldable g =>
RightF f g a -> [a]
foldl1 :: forall a. (a -> a -> a) -> RightF f g a -> a
$cfoldl1 :: forall k (f :: k) (g :: * -> *) a.
Foldable g =>
(a -> a -> a) -> RightF f g a -> a
foldr1 :: forall a. (a -> a -> a) -> RightF f g a -> a
$cfoldr1 :: forall k (f :: k) (g :: * -> *) a.
Foldable g =>
(a -> a -> a) -> RightF f g a -> a
foldl' :: forall b a. (b -> a -> b) -> b -> RightF f g a -> b
$cfoldl' :: forall k (f :: k) (g :: * -> *) b a.
Foldable g =>
(b -> a -> b) -> b -> RightF f g a -> b
foldl :: forall b a. (b -> a -> b) -> b -> RightF f g a -> b
$cfoldl :: forall k (f :: k) (g :: * -> *) b a.
Foldable g =>
(b -> a -> b) -> b -> RightF f g a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> RightF f g a -> b
$cfoldr' :: forall k (f :: k) (g :: * -> *) a b.
Foldable g =>
(a -> b -> b) -> b -> RightF f g a -> b
foldr :: forall a b. (a -> b -> b) -> b -> RightF f g a -> b
$cfoldr :: forall k (f :: k) (g :: * -> *) a b.
Foldable g =>
(a -> b -> b) -> b -> RightF f g a -> b
foldMap' :: forall m a. Monoid m => (a -> m) -> RightF f g a -> m
$cfoldMap' :: forall k (f :: k) (g :: * -> *) m a.
(Foldable g, Monoid m) =>
(a -> m) -> RightF f g a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> RightF f g a -> m
$cfoldMap :: forall k (f :: k) (g :: * -> *) m a.
(Foldable g, Monoid m) =>
(a -> m) -> RightF f g a -> m
fold :: forall m. Monoid m => RightF f g m -> m
$cfold :: forall k (f :: k) (g :: * -> *) m.
(Foldable g, Monoid m) =>
RightF f g m -> m
Foldable, forall {k} {f :: k} {g :: * -> *}.
Traversable g =>
Functor (RightF f g)
forall {k} {f :: k} {g :: * -> *}.
Traversable g =>
Foldable (RightF f g)
forall k (f :: k) (g :: * -> *) (m :: * -> *) a.
(Traversable g, Monad m) =>
RightF f g (m a) -> m (RightF f g a)
forall k (f :: k) (g :: * -> *) (f :: * -> *) a.
(Traversable g, Applicative f) =>
RightF f g (f a) -> f (RightF f g a)
forall k (f :: k) (g :: * -> *) (m :: * -> *) a b.
(Traversable g, Monad m) =>
(a -> m b) -> RightF f g a -> m (RightF f g b)
forall k (f :: k) (g :: * -> *) (f :: * -> *) a b.
(Traversable g, Applicative f) =>
(a -> f b) -> RightF f g a -> f (RightF f g b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RightF f g a -> f (RightF f g b)
sequence :: forall (m :: * -> *) a.
Monad m =>
RightF f g (m a) -> m (RightF f g a)
$csequence :: forall k (f :: k) (g :: * -> *) (m :: * -> *) a.
(Traversable g, Monad m) =>
RightF f g (m a) -> m (RightF f g a)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RightF f g a -> m (RightF f g b)
$cmapM :: forall k (f :: k) (g :: * -> *) (m :: * -> *) a b.
(Traversable g, Monad m) =>
(a -> m b) -> RightF f g a -> m (RightF f g b)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
RightF f g (f a) -> f (RightF f g a)
$csequenceA :: forall k (f :: k) (g :: * -> *) (f :: * -> *) a.
(Traversable g, Applicative f) =>
RightF f g (f a) -> f (RightF f g a)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RightF f g a -> f (RightF f g b)
$ctraverse :: forall k (f :: k) (g :: * -> *) (f :: * -> *) a b.
(Traversable g, Applicative f) =>
(a -> f b) -> RightF f g a -> f (RightF f g b)
Traversable, Typeable, forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall k (f :: k) k (g :: k -> *) (a :: k) x.
Rep (RightF f g a) x -> RightF f g a
forall k (f :: k) k (g :: k -> *) (a :: k) x.
RightF f g a -> Rep (RightF f g a) x
$cto :: forall k (f :: k) k (g :: k -> *) (a :: k) x.
Rep (RightF f g a) x -> RightF f g a
$cfrom :: forall k (f :: k) k (g :: k -> *) (a :: k) x.
RightF f g a -> Rep (RightF f g a) x
Generic, RightF f g a -> DataType
RightF f g a -> Constr
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall {k} {f :: k} {k} {g :: k -> *} {a :: k}.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
Typeable (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
RightF f g a -> DataType
forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
RightF f g a -> Constr
forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall b. Data b => b -> b) -> RightF f g a -> RightF f g a
forall k (f :: k) k (g :: k -> *) (a :: k) u.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
Int -> (forall d. Data d => d -> u) -> RightF f g a -> u
forall k (f :: k) k (g :: k -> *) (a :: k) u.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall d. Data d => d -> u) -> RightF f g a -> [u]
forall k (f :: k) k (g :: k -> *) (a :: k) r r'.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
forall k (f :: k) k (g :: k -> *) (a :: k) r r'.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
forall k (f :: k) k (g :: k -> *) (a :: k) (m :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Monad m) =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k) (m :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k) (c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k) (c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RightF f g a -> c (RightF f g a)
forall k (f :: k) k (g :: k -> *) (a :: k) (t :: * -> *)
(c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (RightF f g a))
forall k (f :: k) k (g :: k -> *) (a :: k) (t :: * -> * -> *)
(c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (RightF f g a))
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (RightF f g a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RightF f g a -> c (RightF f g a)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
$cgmapMo :: forall k (f :: k) k (g :: k -> *) (a :: k) (m :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
$cgmapMp :: forall k (f :: k) k (g :: k -> *) (a :: k) (m :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), MonadPlus m) =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
$cgmapM :: forall k (f :: k) k (g :: k -> *) (a :: k) (m :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Monad m) =>
(forall d. Data d => d -> m d) -> RightF f g a -> m (RightF f g a)
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> RightF f g a -> u
$cgmapQi :: forall k (f :: k) k (g :: k -> *) (a :: k) u.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
Int -> (forall d. Data d => d -> u) -> RightF f g a -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> RightF f g a -> [u]
$cgmapQ :: forall k (f :: k) k (g :: k -> *) (a :: k) u.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall d. Data d => d -> u) -> RightF f g a -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
$cgmapQr :: forall k (f :: k) k (g :: k -> *) (a :: k) r r'.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
$cgmapQl :: forall k (f :: k) k (g :: k -> *) (a :: k) r r'.
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RightF f g a -> r
gmapT :: (forall b. Data b => b -> b) -> RightF f g a -> RightF f g a
$cgmapT :: forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall b. Data b => b -> b) -> RightF f g a -> RightF f g a
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (RightF f g a))
$cdataCast2 :: forall k (f :: k) k (g :: k -> *) (a :: k) (t :: * -> * -> *)
(c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (RightF f g a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (RightF f g a))
$cdataCast1 :: forall k (f :: k) k (g :: k -> *) (a :: k) (t :: * -> *)
(c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a), Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (RightF f g a))
dataTypeOf :: RightF f g a -> DataType
$cdataTypeOf :: forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
RightF f g a -> DataType
toConstr :: RightF f g a -> Constr
$ctoConstr :: forall k (f :: k) k (g :: k -> *) (a :: k).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
RightF f g a -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (RightF f g a)
$cgunfold :: forall k (f :: k) k (g :: k -> *) (a :: k) (c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (RightF f g a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RightF f g a -> c (RightF f g a)
$cgfoldl :: forall k (f :: k) k (g :: k -> *) (a :: k) (c :: * -> *).
(Typeable f, Typeable a, Typeable g, Typeable k, Typeable k,
Data (g a)) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RightF f g a -> c (RightF f g a)
Data)
deriveShow1 ''RightF
deriveRead1 ''RightF
deriveEq1 ''RightF
deriveOrd1 ''RightF
instance HBifunctor RightF where
hbimap :: forall (f :: k -> *) (j :: k -> *) (g :: k -> *) (l :: k -> *).
(f ~> j) -> (g ~> l) -> RightF f g ~> RightF j l
hbimap f ~> j
_ g ~> l
g (RightF g x
x) = forall {k} {k} (f :: k) (g :: k -> *) (a :: k). g a -> RightF f g a
RightF (g ~> l
g g x
x)
instance HFunctor (RightF g) where
hmap :: forall (f :: k1 -> *) (g :: k1 -> *).
(f ~> g) -> RightF g f ~> RightF g g
hmap f ~> g
f (RightF f x
x) = forall {k} {k} (f :: k) (g :: k -> *) (a :: k). g a -> RightF f g a
RightF (f ~> g
f f x
x)
instance Inject (RightF g) where
inject :: forall (f :: k -> *). f ~> RightF g f
inject = forall {k} {k} (f :: k) (g :: k -> *) (a :: k). g a -> RightF f g a
RightF
instance HTraversable (RightF g) where
htraverse :: forall (h :: * -> *) (f :: k1 -> *) (g :: k1 -> *) (a :: k1).
Applicative h =>
(forall (x :: k1). f x -> h (g x))
-> RightF g f a -> h (RightF g g a)
htraverse forall (x :: k1). f x -> h (g x)
f (RightF f a
x) = forall {k} {k} (f :: k) (g :: k -> *) (a :: k). g a -> RightF f g a
RightF forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (x :: k1). f x -> h (g x)
f f a
x
instance HBind (RightF g) where
hbind :: forall (f :: k -> *) (g :: k -> *).
(f ~> RightF g g) -> RightF g f ~> RightF g g
hbind f ~> RightF g g
f (RightF f x
x) = f ~> RightF g g
f f x
x
instance Interpret (RightF g) f where
retract :: RightF g f ~> f
retract (RightF f x
x) = f x
x
interpret :: forall (g :: k -> *). (g ~> f) -> RightF g g ~> f
interpret g ~> f
f (RightF g x
x) = g ~> f
f g x
x