{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Trustworthy #-}
module Data.Bifunctor.Biap
( Biap(..)
) where
import Control.Applicative
import Control.Monad
import qualified Control.Monad.Fail as Fail (MonadFail)
import Data.Biapplicative
import Data.Bifoldable
import Data.Bitraversable
import Data.Functor.Classes
import qualified Data.Semigroup as S
import GHC.Generics
newtype Biap bi a b = Biap { forall (bi :: * -> * -> *) a b. Biap bi a b -> bi a b
getBiap :: bi a b }
deriving ( Biap bi a b -> Biap bi a b -> Bool
(Biap bi a b -> Biap bi a b -> Bool)
-> (Biap bi a b -> Biap bi a b -> Bool) -> Eq (Biap bi a b)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (bi :: * -> * -> *) a b.
Eq (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
$c== :: forall (bi :: * -> * -> *) a b.
Eq (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
== :: Biap bi a b -> Biap bi a b -> Bool
$c/= :: forall (bi :: * -> * -> *) a b.
Eq (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
/= :: Biap bi a b -> Biap bi a b -> Bool
Eq
, Eq (Biap bi a b)
Eq (Biap bi a b) =>
(Biap bi a b -> Biap bi a b -> Ordering)
-> (Biap bi a b -> Biap bi a b -> Bool)
-> (Biap bi a b -> Biap bi a b -> Bool)
-> (Biap bi a b -> Biap bi a b -> Bool)
-> (Biap bi a b -> Biap bi a b -> Bool)
-> (Biap bi a b -> Biap bi a b -> Biap bi a b)
-> (Biap bi a b -> Biap bi a b -> Biap bi a b)
-> Ord (Biap bi a b)
Biap bi a b -> Biap bi a b -> Bool
Biap bi a b -> Biap bi a b -> Ordering
Biap bi a b -> Biap bi a b -> Biap bi a b
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 (bi :: * -> * -> *) a b. Ord (bi a b) => Eq (Biap bi a b)
forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Ordering
forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Biap bi a b
$ccompare :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Ordering
compare :: Biap bi a b -> Biap bi a b -> Ordering
$c< :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
< :: Biap bi a b -> Biap bi a b -> Bool
$c<= :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
<= :: Biap bi a b -> Biap bi a b -> Bool
$c> :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
> :: Biap bi a b -> Biap bi a b -> Bool
$c>= :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Bool
>= :: Biap bi a b -> Biap bi a b -> Bool
$cmax :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Biap bi a b
max :: Biap bi a b -> Biap bi a b -> Biap bi a b
$cmin :: forall (bi :: * -> * -> *) a b.
Ord (bi a b) =>
Biap bi a b -> Biap bi a b -> Biap bi a b
min :: Biap bi a b -> Biap bi a b -> Biap bi a b
Ord
, Int -> Biap bi a b -> ShowS
[Biap bi a b] -> ShowS
Biap bi a b -> String
(Int -> Biap bi a b -> ShowS)
-> (Biap bi a b -> String)
-> ([Biap bi a b] -> ShowS)
-> Show (Biap bi a b)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
Int -> Biap bi a b -> ShowS
forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
[Biap bi a b] -> ShowS
forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
Biap bi a b -> String
$cshowsPrec :: forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
Int -> Biap bi a b -> ShowS
showsPrec :: Int -> Biap bi a b -> ShowS
$cshow :: forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
Biap bi a b -> String
show :: Biap bi a b -> String
$cshowList :: forall (bi :: * -> * -> *) a b.
Show (bi a b) =>
[Biap bi a b] -> ShowS
showList :: [Biap bi a b] -> ShowS
Show
, ReadPrec [Biap bi a b]
ReadPrec (Biap bi a b)
Int -> ReadS (Biap bi a b)
ReadS [Biap bi a b]
(Int -> ReadS (Biap bi a b))
-> ReadS [Biap bi a b]
-> ReadPrec (Biap bi a b)
-> ReadPrec [Biap bi a b]
-> Read (Biap bi a b)
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadPrec [Biap bi a b]
forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadPrec (Biap bi a b)
forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
Int -> ReadS (Biap bi a b)
forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadS [Biap bi a b]
$creadsPrec :: forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
Int -> ReadS (Biap bi a b)
readsPrec :: Int -> ReadS (Biap bi a b)
$creadList :: forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadS [Biap bi a b]
readList :: ReadS [Biap bi a b]
$creadPrec :: forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadPrec (Biap bi a b)
readPrec :: ReadPrec (Biap bi a b)
$creadListPrec :: forall (bi :: * -> * -> *) a b.
Read (bi a b) =>
ReadPrec [Biap bi a b]
readListPrec :: ReadPrec [Biap bi a b]
Read
, Int -> Biap bi a b
Biap bi a b -> Int
Biap bi a b -> [Biap bi a b]
Biap bi a b -> Biap bi a b
Biap bi a b -> Biap bi a b -> [Biap bi a b]
Biap bi a b -> Biap bi a b -> Biap bi a b -> [Biap bi a b]
(Biap bi a b -> Biap bi a b)
-> (Biap bi a b -> Biap bi a b)
-> (Int -> Biap bi a b)
-> (Biap bi a b -> Int)
-> (Biap bi a b -> [Biap bi a b])
-> (Biap bi a b -> Biap bi a b -> [Biap bi a b])
-> (Biap bi a b -> Biap bi a b -> [Biap bi a b])
-> (Biap bi a b -> Biap bi a b -> Biap bi a b -> [Biap bi a b])
-> Enum (Biap bi a b)
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
forall (bi :: * -> * -> *) a b. Enum (bi a b) => Int -> Biap bi a b
forall (bi :: * -> * -> *) a b. Enum (bi a b) => Biap bi a b -> Int
forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> [Biap bi a b]
forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b
forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b -> [Biap bi a b]
forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b -> Biap bi a b -> [Biap bi a b]
$csucc :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b
succ :: Biap bi a b -> Biap bi a b
$cpred :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b
pred :: Biap bi a b -> Biap bi a b
$ctoEnum :: forall (bi :: * -> * -> *) a b. Enum (bi a b) => Int -> Biap bi a b
toEnum :: Int -> Biap bi a b
$cfromEnum :: forall (bi :: * -> * -> *) a b. Enum (bi a b) => Biap bi a b -> Int
fromEnum :: Biap bi a b -> Int
$cenumFrom :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> [Biap bi a b]
enumFrom :: Biap bi a b -> [Biap bi a b]
$cenumFromThen :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b -> [Biap bi a b]
enumFromThen :: Biap bi a b -> Biap bi a b -> [Biap bi a b]
$cenumFromTo :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b -> [Biap bi a b]
enumFromTo :: Biap bi a b -> Biap bi a b -> [Biap bi a b]
$cenumFromThenTo :: forall (bi :: * -> * -> *) a b.
Enum (bi a b) =>
Biap bi a b -> Biap bi a b -> Biap bi a b -> [Biap bi a b]
enumFromThenTo :: Biap bi a b -> Biap bi a b -> Biap bi a b -> [Biap bi a b]
Enum
, (forall a b. (a -> b) -> Biap bi a a -> Biap bi a b)
-> (forall a b. a -> Biap bi a b -> Biap bi a a)
-> Functor (Biap bi a)
forall a b. a -> Biap bi a b -> Biap bi a a
forall a b. (a -> b) -> Biap bi a a -> Biap bi a b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
forall (bi :: * -> * -> *) a a b.
Functor (bi a) =>
a -> Biap bi a b -> Biap bi a a
forall (bi :: * -> * -> *) a a b.
Functor (bi a) =>
(a -> b) -> Biap bi a a -> Biap bi a b
$cfmap :: forall (bi :: * -> * -> *) a a b.
Functor (bi a) =>
(a -> b) -> Biap bi a a -> Biap bi a b
fmap :: forall a b. (a -> b) -> Biap bi a a -> Biap bi a b
$c<$ :: forall (bi :: * -> * -> *) a a b.
Functor (bi a) =>
a -> Biap bi a b -> Biap bi a a
<$ :: forall a b. a -> Biap bi a b -> Biap bi a a
Functor
, (forall m. Monoid m => Biap bi a m -> m)
-> (forall m a. Monoid m => (a -> m) -> Biap bi a a -> m)
-> (forall m a. Monoid m => (a -> m) -> Biap bi a a -> m)
-> (forall a b. (a -> b -> b) -> b -> Biap bi a a -> b)
-> (forall a b. (a -> b -> b) -> b -> Biap bi a a -> b)
-> (forall b a. (b -> a -> b) -> b -> Biap bi a a -> b)
-> (forall b a. (b -> a -> b) -> b -> Biap bi a a -> b)
-> (forall a. (a -> a -> a) -> Biap bi a a -> a)
-> (forall a. (a -> a -> a) -> Biap bi a a -> a)
-> (forall a. Biap bi a a -> [a])
-> (forall a. Biap bi a a -> Bool)
-> (forall a. Biap bi a a -> Int)
-> (forall a. Eq a => a -> Biap bi a a -> Bool)
-> (forall a. Ord a => Biap bi a a -> a)
-> (forall a. Ord a => Biap bi a a -> a)
-> (forall a. Num a => Biap bi a a -> a)
-> (forall a. Num a => Biap bi a a -> a)
-> Foldable (Biap bi a)
forall a. Eq a => a -> Biap bi a a -> Bool
forall a. Num a => Biap bi a a -> a
forall a. Ord a => Biap bi a a -> a
forall m. Monoid m => Biap bi a m -> m
forall a. Biap bi a a -> Bool
forall a. Biap bi a a -> Int
forall a. Biap bi a a -> [a]
forall a. (a -> a -> a) -> Biap bi a a -> a
forall m a. Monoid m => (a -> m) -> Biap bi a a -> m
forall b a. (b -> a -> b) -> b -> Biap bi a a -> b
forall a b. (a -> b -> b) -> b -> Biap bi a 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 (bi :: * -> * -> *) a a.
(Foldable (bi a), Eq a) =>
a -> Biap bi a a -> Bool
forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Num a) =>
Biap bi a a -> a
forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Ord a) =>
Biap bi a a -> a
forall (bi :: * -> * -> *) a m.
(Foldable (bi a), Monoid m) =>
Biap bi a m -> m
forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> Bool
forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> Int
forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> [a]
forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
(a -> a -> a) -> Biap bi a a -> a
forall (bi :: * -> * -> *) a m a.
(Foldable (bi a), Monoid m) =>
(a -> m) -> Biap bi a a -> m
forall (bi :: * -> * -> *) a b a.
Foldable (bi a) =>
(b -> a -> b) -> b -> Biap bi a a -> b
forall (bi :: * -> * -> *) a a b.
Foldable (bi a) =>
(a -> b -> b) -> b -> Biap bi a a -> b
$cfold :: forall (bi :: * -> * -> *) a m.
(Foldable (bi a), Monoid m) =>
Biap bi a m -> m
fold :: forall m. Monoid m => Biap bi a m -> m
$cfoldMap :: forall (bi :: * -> * -> *) a m a.
(Foldable (bi a), Monoid m) =>
(a -> m) -> Biap bi a a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> Biap bi a a -> m
$cfoldMap' :: forall (bi :: * -> * -> *) a m a.
(Foldable (bi a), Monoid m) =>
(a -> m) -> Biap bi a a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> Biap bi a a -> m
$cfoldr :: forall (bi :: * -> * -> *) a a b.
Foldable (bi a) =>
(a -> b -> b) -> b -> Biap bi a a -> b
foldr :: forall a b. (a -> b -> b) -> b -> Biap bi a a -> b
$cfoldr' :: forall (bi :: * -> * -> *) a a b.
Foldable (bi a) =>
(a -> b -> b) -> b -> Biap bi a a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> Biap bi a a -> b
$cfoldl :: forall (bi :: * -> * -> *) a b a.
Foldable (bi a) =>
(b -> a -> b) -> b -> Biap bi a a -> b
foldl :: forall b a. (b -> a -> b) -> b -> Biap bi a a -> b
$cfoldl' :: forall (bi :: * -> * -> *) a b a.
Foldable (bi a) =>
(b -> a -> b) -> b -> Biap bi a a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> Biap bi a a -> b
$cfoldr1 :: forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
(a -> a -> a) -> Biap bi a a -> a
foldr1 :: forall a. (a -> a -> a) -> Biap bi a a -> a
$cfoldl1 :: forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
(a -> a -> a) -> Biap bi a a -> a
foldl1 :: forall a. (a -> a -> a) -> Biap bi a a -> a
$ctoList :: forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> [a]
toList :: forall a. Biap bi a a -> [a]
$cnull :: forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> Bool
null :: forall a. Biap bi a a -> Bool
$clength :: forall (bi :: * -> * -> *) a a.
Foldable (bi a) =>
Biap bi a a -> Int
length :: forall a. Biap bi a a -> Int
$celem :: forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Eq a) =>
a -> Biap bi a a -> Bool
elem :: forall a. Eq a => a -> Biap bi a a -> Bool
$cmaximum :: forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Ord a) =>
Biap bi a a -> a
maximum :: forall a. Ord a => Biap bi a a -> a
$cminimum :: forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Ord a) =>
Biap bi a a -> a
minimum :: forall a. Ord a => Biap bi a a -> a
$csum :: forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Num a) =>
Biap bi a a -> a
sum :: forall a. Num a => Biap bi a a -> a
$cproduct :: forall (bi :: * -> * -> *) a a.
(Foldable (bi a), Num a) =>
Biap bi a a -> a
product :: forall a. Num a => Biap bi a a -> a
Foldable
, Functor (Biap bi a)
Foldable (Biap bi a)
(Functor (Biap bi a), Foldable (Biap bi a)) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Biap bi a a -> f (Biap bi a b))
-> (forall (f :: * -> *) a.
Applicative f =>
Biap bi a (f a) -> f (Biap bi a a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Biap bi a a -> m (Biap bi a b))
-> (forall (m :: * -> *) a.
Monad m =>
Biap bi a (m a) -> m (Biap bi a a))
-> Traversable (Biap bi a)
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 (m :: * -> *) a.
Monad m =>
Biap bi a (m a) -> m (Biap bi a a)
forall (f :: * -> *) a.
Applicative f =>
Biap bi a (f a) -> f (Biap bi a a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Biap bi a a -> m (Biap bi a b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Biap bi a a -> f (Biap bi a b)
forall (bi :: * -> * -> *) a.
Traversable (bi a) =>
Functor (Biap bi a)
forall (bi :: * -> * -> *) a.
Traversable (bi a) =>
Foldable (Biap bi a)
forall (bi :: * -> * -> *) a (m :: * -> *) a.
(Traversable (bi a), Monad m) =>
Biap bi a (m a) -> m (Biap bi a a)
forall (bi :: * -> * -> *) a (f :: * -> *) a.
(Traversable (bi a), Applicative f) =>
Biap bi a (f a) -> f (Biap bi a a)
forall (bi :: * -> * -> *) a (m :: * -> *) a b.
(Traversable (bi a), Monad m) =>
(a -> m b) -> Biap bi a a -> m (Biap bi a b)
forall (bi :: * -> * -> *) a (f :: * -> *) a b.
(Traversable (bi a), Applicative f) =>
(a -> f b) -> Biap bi a a -> f (Biap bi a b)
$ctraverse :: forall (bi :: * -> * -> *) a (f :: * -> *) a b.
(Traversable (bi a), Applicative f) =>
(a -> f b) -> Biap bi a a -> f (Biap bi a b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Biap bi a a -> f (Biap bi a b)
$csequenceA :: forall (bi :: * -> * -> *) a (f :: * -> *) a.
(Traversable (bi a), Applicative f) =>
Biap bi a (f a) -> f (Biap bi a a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
Biap bi a (f a) -> f (Biap bi a a)
$cmapM :: forall (bi :: * -> * -> *) a (m :: * -> *) a b.
(Traversable (bi a), Monad m) =>
(a -> m b) -> Biap bi a a -> m (Biap bi a b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Biap bi a a -> m (Biap bi a b)
$csequence :: forall (bi :: * -> * -> *) a (m :: * -> *) a.
(Traversable (bi a), Monad m) =>
Biap bi a (m a) -> m (Biap bi a a)
sequence :: forall (m :: * -> *) a.
Monad m =>
Biap bi a (m a) -> m (Biap bi a a)
Traversable
, Applicative (Biap bi a)
Applicative (Biap bi a) =>
(forall a. Biap bi a a)
-> (forall a. Biap bi a a -> Biap bi a a -> Biap bi a a)
-> (forall a. Biap bi a a -> Biap bi a [a])
-> (forall a. Biap bi a a -> Biap bi a [a])
-> Alternative (Biap bi a)
forall a. Biap bi a a
forall a. Biap bi a a -> Biap bi a [a]
forall a. Biap bi a a -> Biap bi a a -> Biap bi a a
forall (f :: * -> *).
Applicative f =>
(forall a. f a)
-> (forall a. f a -> f a -> f a)
-> (forall a. f a -> f [a])
-> (forall a. f a -> f [a])
-> Alternative f
forall (bi :: * -> * -> *) a.
Alternative (bi a) =>
Applicative (Biap bi a)
forall (bi :: * -> * -> *) a a. Alternative (bi a) => Biap bi a a
forall (bi :: * -> * -> *) a a.
Alternative (bi a) =>
Biap bi a a -> Biap bi a [a]
forall (bi :: * -> * -> *) a a.
Alternative (bi a) =>
Biap bi a a -> Biap bi a a -> Biap bi a a
$cempty :: forall (bi :: * -> * -> *) a a. Alternative (bi a) => Biap bi a a
empty :: forall a. Biap bi a a
$c<|> :: forall (bi :: * -> * -> *) a a.
Alternative (bi a) =>
Biap bi a a -> Biap bi a a -> Biap bi a a
<|> :: forall a. Biap bi a a -> Biap bi a a -> Biap bi a a
$csome :: forall (bi :: * -> * -> *) a a.
Alternative (bi a) =>
Biap bi a a -> Biap bi a [a]
some :: forall a. Biap bi a a -> Biap bi a [a]
$cmany :: forall (bi :: * -> * -> *) a a.
Alternative (bi a) =>
Biap bi a a -> Biap bi a [a]
many :: forall a. Biap bi a a -> Biap bi a [a]
Alternative
, Functor (Biap bi a)
Functor (Biap bi a) =>
(forall a. a -> Biap bi a a)
-> (forall a b. Biap bi a (a -> b) -> Biap bi a a -> Biap bi a b)
-> (forall a b c.
(a -> b -> c) -> Biap bi a a -> Biap bi a b -> Biap bi a c)
-> (forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b)
-> (forall a b. Biap bi a a -> Biap bi a b -> Biap bi a a)
-> Applicative (Biap bi a)
forall a. a -> Biap bi a a
forall a b. Biap bi a a -> Biap bi a b -> Biap bi a a
forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b
forall a b. Biap bi a (a -> b) -> Biap bi a a -> Biap bi a b
forall a b c.
(a -> b -> c) -> Biap bi a a -> Biap bi a b -> Biap bi a c
forall (f :: * -> *).
Functor f =>
(forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
forall (bi :: * -> * -> *) a.
Applicative (bi a) =>
Functor (Biap bi a)
forall (bi :: * -> * -> *) a a.
Applicative (bi a) =>
a -> Biap bi a a
forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a a
forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a b
forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a (a -> b) -> Biap bi a a -> Biap bi a b
forall (bi :: * -> * -> *) a a b c.
Applicative (bi a) =>
(a -> b -> c) -> Biap bi a a -> Biap bi a b -> Biap bi a c
$cpure :: forall (bi :: * -> * -> *) a a.
Applicative (bi a) =>
a -> Biap bi a a
pure :: forall a. a -> Biap bi a a
$c<*> :: forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a (a -> b) -> Biap bi a a -> Biap bi a b
<*> :: forall a b. Biap bi a (a -> b) -> Biap bi a a -> Biap bi a b
$cliftA2 :: forall (bi :: * -> * -> *) a a b c.
Applicative (bi a) =>
(a -> b -> c) -> Biap bi a a -> Biap bi a b -> Biap bi a c
liftA2 :: forall a b c.
(a -> b -> c) -> Biap bi a a -> Biap bi a b -> Biap bi a c
$c*> :: forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a b
*> :: forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b
$c<* :: forall (bi :: * -> * -> *) a a b.
Applicative (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a a
<* :: forall a b. Biap bi a a -> Biap bi a b -> Biap bi a a
Applicative
, (forall x. Biap bi a b -> Rep (Biap bi a b) x)
-> (forall x. Rep (Biap bi a b) x -> Biap bi a b)
-> Generic (Biap bi a b)
forall x. Rep (Biap bi a b) x -> Biap bi a b
forall x. Biap bi a b -> Rep (Biap bi a b) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (bi :: * -> * -> *) a b x.
Rep (Biap bi a b) x -> Biap bi a b
forall (bi :: * -> * -> *) a b x.
Biap bi a b -> Rep (Biap bi a b) x
$cfrom :: forall (bi :: * -> * -> *) a b x.
Biap bi a b -> Rep (Biap bi a b) x
from :: forall x. Biap bi a b -> Rep (Biap bi a b) x
$cto :: forall (bi :: * -> * -> *) a b x.
Rep (Biap bi a b) x -> Biap bi a b
to :: forall x. Rep (Biap bi a b) x -> Biap bi a b
Generic
, (forall a. Biap bi a a -> Rep1 (Biap bi a) a)
-> (forall a. Rep1 (Biap bi a) a -> Biap bi a a)
-> Generic1 (Biap bi a)
forall a. Rep1 (Biap bi a) a -> Biap bi a a
forall a. Biap bi a a -> Rep1 (Biap bi a) a
forall k (f :: k -> *).
(forall (a :: k). f a -> Rep1 f a)
-> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
forall (bi :: * -> * -> *) a a. Rep1 (Biap bi a) a -> Biap bi a a
forall (bi :: * -> * -> *) a a. Biap bi a a -> Rep1 (Biap bi a) a
$cfrom1 :: forall (bi :: * -> * -> *) a a. Biap bi a a -> Rep1 (Biap bi a) a
from1 :: forall a. Biap bi a a -> Rep1 (Biap bi a) a
$cto1 :: forall (bi :: * -> * -> *) a a. Rep1 (Biap bi a) a -> Biap bi a a
to1 :: forall a. Rep1 (Biap bi a) a -> Biap bi a a
Generic1
, Applicative (Biap bi a)
Applicative (Biap bi a) =>
(forall a b. Biap bi a a -> (a -> Biap bi a b) -> Biap bi a b)
-> (forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b)
-> (forall a. a -> Biap bi a a)
-> Monad (Biap bi a)
forall a. a -> Biap bi a a
forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b
forall a b. Biap bi a a -> (a -> Biap bi a b) -> Biap bi a b
forall (m :: * -> *).
Applicative m =>
(forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
forall (bi :: * -> * -> *) a.
Monad (bi a) =>
Applicative (Biap bi a)
forall (bi :: * -> * -> *) a a. Monad (bi a) => a -> Biap bi a a
forall (bi :: * -> * -> *) a a b.
Monad (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a b
forall (bi :: * -> * -> *) a a b.
Monad (bi a) =>
Biap bi a a -> (a -> Biap bi a b) -> Biap bi a b
$c>>= :: forall (bi :: * -> * -> *) a a b.
Monad (bi a) =>
Biap bi a a -> (a -> Biap bi a b) -> Biap bi a b
>>= :: forall a b. Biap bi a a -> (a -> Biap bi a b) -> Biap bi a b
$c>> :: forall (bi :: * -> * -> *) a a b.
Monad (bi a) =>
Biap bi a a -> Biap bi a b -> Biap bi a b
>> :: forall a b. Biap bi a a -> Biap bi a b -> Biap bi a b
$creturn :: forall (bi :: * -> * -> *) a a. Monad (bi a) => a -> Biap bi a a
return :: forall a. a -> Biap bi a a
Monad
, Monad (Biap bi a)
Monad (Biap bi a) =>
(forall a. String -> Biap bi a a) -> MonadFail (Biap bi a)
forall a. String -> Biap bi a a
forall (m :: * -> *).
Monad m =>
(forall a. String -> m a) -> MonadFail m
forall (bi :: * -> * -> *) a. MonadFail (bi a) => Monad (Biap bi a)
forall (bi :: * -> * -> *) a a.
MonadFail (bi a) =>
String -> Biap bi a a
$cfail :: forall (bi :: * -> * -> *) a a.
MonadFail (bi a) =>
String -> Biap bi a a
fail :: forall a. String -> Biap bi a a
Fail.MonadFail
, Monad (Biap bi a)
Alternative (Biap bi a)
(Alternative (Biap bi a), Monad (Biap bi a)) =>
(forall a. Biap bi a a)
-> (forall a. Biap bi a a -> Biap bi a a -> Biap bi a a)
-> MonadPlus (Biap bi a)
forall a. Biap bi a a
forall a. Biap bi a a -> Biap bi a a -> Biap bi a a
forall (m :: * -> *).
(Alternative m, Monad m) =>
(forall a. m a) -> (forall a. m a -> m a -> m a) -> MonadPlus m
forall (bi :: * -> * -> *) a. MonadPlus (bi a) => Monad (Biap bi a)
forall (bi :: * -> * -> *) a.
MonadPlus (bi a) =>
Alternative (Biap bi a)
forall (bi :: * -> * -> *) a a. MonadPlus (bi a) => Biap bi a a
forall (bi :: * -> * -> *) a a.
MonadPlus (bi a) =>
Biap bi a a -> Biap bi a a -> Biap bi a a
$cmzero :: forall (bi :: * -> * -> *) a a. MonadPlus (bi a) => Biap bi a a
mzero :: forall a. Biap bi a a
$cmplus :: forall (bi :: * -> * -> *) a a.
MonadPlus (bi a) =>
Biap bi a a -> Biap bi a a -> Biap bi a a
mplus :: forall a. Biap bi a a -> Biap bi a a -> Biap bi a a
MonadPlus
, (forall a. Eq a => Eq (Biap bi a a)) =>
(forall a b.
(a -> b -> Bool) -> Biap bi a a -> Biap bi a b -> Bool)
-> Eq1 (Biap bi a)
forall a. Eq a => Eq (Biap bi a a)
forall a b. (a -> b -> Bool) -> Biap bi a a -> Biap bi a b -> Bool
forall (f :: * -> *).
(forall a. Eq a => Eq (f a)) =>
(forall a b. (a -> b -> Bool) -> f a -> f b -> Bool) -> Eq1 f
forall (bi :: * -> * -> *) a a.
(Eq1 (bi a), Eq a) =>
Eq (Biap bi a a)
forall (bi :: * -> * -> *) a a b.
Eq1 (bi a) =>
(a -> b -> Bool) -> Biap bi a a -> Biap bi a b -> Bool
$cliftEq :: forall (bi :: * -> * -> *) a a b.
Eq1 (bi a) =>
(a -> b -> Bool) -> Biap bi a a -> Biap bi a b -> Bool
liftEq :: forall a b. (a -> b -> Bool) -> Biap bi a a -> Biap bi a b -> Bool
Eq1
, Eq1 (Biap bi a)
(Eq1 (Biap bi a), forall a. Ord a => Ord (Biap bi a a)) =>
(forall a b.
(a -> b -> Ordering) -> Biap bi a a -> Biap bi a b -> Ordering)
-> Ord1 (Biap bi a)
forall a. Ord a => Ord (Biap bi a a)
forall a b.
(a -> b -> Ordering) -> Biap bi a a -> Biap bi a b -> Ordering
forall (f :: * -> *).
(Eq1 f, forall a. Ord a => Ord (f a)) =>
(forall a b. (a -> b -> Ordering) -> f a -> f b -> Ordering)
-> Ord1 f
forall (bi :: * -> * -> *) a. Ord1 (bi a) => Eq1 (Biap bi a)
forall (bi :: * -> * -> *) a a.
(Ord1 (bi a), Ord a) =>
Ord (Biap bi a a)
forall (bi :: * -> * -> *) a a b.
Ord1 (bi a) =>
(a -> b -> Ordering) -> Biap bi a a -> Biap bi a b -> Ordering
$cliftCompare :: forall (bi :: * -> * -> *) a a b.
Ord1 (bi a) =>
(a -> b -> Ordering) -> Biap bi a a -> Biap bi a b -> Ordering
liftCompare :: forall a b.
(a -> b -> Ordering) -> Biap bi a a -> Biap bi a b -> Ordering
Ord1
, (forall a. Functor (Biap bi a)) =>
(forall a b c d.
(a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d)
-> (forall a b c. (a -> b) -> Biap bi a c -> Biap bi b c)
-> (forall b c a. (b -> c) -> Biap bi a b -> Biap bi a c)
-> Bifunctor (Biap bi)
forall a. Functor (Biap bi a)
forall a b c. (a -> b) -> Biap bi a c -> Biap bi b c
forall b c a. (b -> c) -> Biap bi a b -> Biap bi a c
forall a b c d. (a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
forall (bi :: * -> * -> *) a. Bifunctor bi => Functor (Biap bi a)
forall (bi :: * -> * -> *) a b c.
Bifunctor bi =>
(a -> b) -> Biap bi a c -> Biap bi b c
forall (bi :: * -> * -> *) b c a.
Bifunctor bi =>
(b -> c) -> Biap bi a b -> Biap bi a c
forall (bi :: * -> * -> *) a b c d.
Bifunctor bi =>
(a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
forall (p :: * -> * -> *).
(forall a. Functor (p a)) =>
(forall a b c d. (a -> b) -> (c -> d) -> p a c -> p b d)
-> (forall a b c. (a -> b) -> p a c -> p b c)
-> (forall b c a. (b -> c) -> p a b -> p a c)
-> Bifunctor p
$cbimap :: forall (bi :: * -> * -> *) a b c d.
Bifunctor bi =>
(a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
bimap :: forall a b c d. (a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
$cfirst :: forall (bi :: * -> * -> *) a b c.
Bifunctor bi =>
(a -> b) -> Biap bi a c -> Biap bi b c
first :: forall a b c. (a -> b) -> Biap bi a c -> Biap bi b c
$csecond :: forall (bi :: * -> * -> *) b c a.
Bifunctor bi =>
(b -> c) -> Biap bi a b -> Biap bi a c
second :: forall b c a. (b -> c) -> Biap bi a b -> Biap bi a c
Bifunctor
, Bifunctor (Biap bi)
Bifunctor (Biap bi) =>
(forall a b. a -> b -> Biap bi a b)
-> (forall a b c d.
Biap bi (a -> b) (c -> d) -> Biap bi a c -> Biap bi b d)
-> (forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f)
-> (forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi c d)
-> (forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi a b)
-> Biapplicative (Biap bi)
forall a b. a -> b -> Biap bi a b
forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi a b
forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi c d
forall a b c d.
Biap bi (a -> b) (c -> d) -> Biap bi a c -> Biap bi b d
forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
forall (p :: * -> * -> *).
Bifunctor p =>
(forall a b. a -> b -> p a b)
-> (forall a b c d. p (a -> b) (c -> d) -> p a c -> p b d)
-> (forall a b c d e f.
(a -> b -> c) -> (d -> e -> f) -> p a d -> p b e -> p c f)
-> (forall a b c d. p a b -> p c d -> p c d)
-> (forall a b c d. p a b -> p c d -> p a b)
-> Biapplicative p
forall (bi :: * -> * -> *). Biapplicative bi => Bifunctor (Biap bi)
forall (bi :: * -> * -> *) a b.
Biapplicative bi =>
a -> b -> Biap bi a b
forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi a b -> Biap bi c d -> Biap bi a b
forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi a b -> Biap bi c d -> Biap bi c d
forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi (a -> b) (c -> d) -> Biap bi a c -> Biap bi b d
forall (bi :: * -> * -> *) a b c d e f.
Biapplicative bi =>
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
$cbipure :: forall (bi :: * -> * -> *) a b.
Biapplicative bi =>
a -> b -> Biap bi a b
bipure :: forall a b. a -> b -> Biap bi a b
$c<<*>> :: forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi (a -> b) (c -> d) -> Biap bi a c -> Biap bi b d
<<*>> :: forall a b c d.
Biap bi (a -> b) (c -> d) -> Biap bi a c -> Biap bi b d
$cbiliftA2 :: forall (bi :: * -> * -> *) a b c d e f.
Biapplicative bi =>
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
biliftA2 :: forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
$c*>> :: forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi a b -> Biap bi c d -> Biap bi c d
*>> :: forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi c d
$c<<* :: forall (bi :: * -> * -> *) a b c d.
Biapplicative bi =>
Biap bi a b -> Biap bi c d -> Biap bi a b
<<* :: forall a b c d. Biap bi a b -> Biap bi c d -> Biap bi a b
Biapplicative
, (forall m. Monoid m => Biap bi m m -> m)
-> (forall m a b.
Monoid m =>
(a -> m) -> (b -> m) -> Biap bi a b -> m)
-> (forall a c b.
(a -> c -> c) -> (b -> c -> c) -> c -> Biap bi a b -> c)
-> (forall c a b.
(c -> a -> c) -> (c -> b -> c) -> c -> Biap bi a b -> c)
-> Bifoldable (Biap bi)
forall m. Monoid m => Biap bi m m -> m
forall m a b. Monoid m => (a -> m) -> (b -> m) -> Biap bi a b -> m
forall c a b.
(c -> a -> c) -> (c -> b -> c) -> c -> Biap bi a b -> c
forall a c b.
(a -> c -> c) -> (b -> c -> c) -> c -> Biap bi a b -> c
forall (bi :: * -> * -> *) m.
(Bifoldable bi, Monoid m) =>
Biap bi m m -> m
forall (bi :: * -> * -> *) m a b.
(Bifoldable bi, Monoid m) =>
(a -> m) -> (b -> m) -> Biap bi a b -> m
forall (bi :: * -> * -> *) c a b.
Bifoldable bi =>
(c -> a -> c) -> (c -> b -> c) -> c -> Biap bi a b -> c
forall (bi :: * -> * -> *) a c b.
Bifoldable bi =>
(a -> c -> c) -> (b -> c -> c) -> c -> Biap bi a b -> c
forall (p :: * -> * -> *).
(forall m. Monoid m => p m m -> m)
-> (forall m a b. Monoid m => (a -> m) -> (b -> m) -> p a b -> m)
-> (forall a c b.
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c)
-> (forall c a b.
(c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c)
-> Bifoldable p
$cbifold :: forall (bi :: * -> * -> *) m.
(Bifoldable bi, Monoid m) =>
Biap bi m m -> m
bifold :: forall m. Monoid m => Biap bi m m -> m
$cbifoldMap :: forall (bi :: * -> * -> *) m a b.
(Bifoldable bi, Monoid m) =>
(a -> m) -> (b -> m) -> Biap bi a b -> m
bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> Biap bi a b -> m
$cbifoldr :: forall (bi :: * -> * -> *) a c b.
Bifoldable bi =>
(a -> c -> c) -> (b -> c -> c) -> c -> Biap bi a b -> c
bifoldr :: forall a c b.
(a -> c -> c) -> (b -> c -> c) -> c -> Biap bi a b -> c
$cbifoldl :: forall (bi :: * -> * -> *) c a b.
Bifoldable bi =>
(c -> a -> c) -> (c -> b -> c) -> c -> Biap bi a b -> c
bifoldl :: forall c a b.
(c -> a -> c) -> (c -> b -> c) -> c -> Biap bi a b -> c
Bifoldable
, (forall a. Eq a => Eq1 (Biap bi a)) =>
(forall a b c d.
(a -> b -> Bool)
-> (c -> d -> Bool) -> Biap bi a c -> Biap bi b d -> Bool)
-> Eq2 (Biap bi)
forall a. Eq a => Eq1 (Biap bi a)
forall a b c d.
(a -> b -> Bool)
-> (c -> d -> Bool) -> Biap bi a c -> Biap bi b d -> Bool
forall (bi :: * -> * -> *) a. (Eq2 bi, Eq a) => Eq1 (Biap bi a)
forall (bi :: * -> * -> *) a b c d.
Eq2 bi =>
(a -> b -> Bool)
-> (c -> d -> Bool) -> Biap bi a c -> Biap bi b d -> Bool
forall (f :: * -> * -> *).
(forall a. Eq a => Eq1 (f a)) =>
(forall a b c d.
(a -> b -> Bool) -> (c -> d -> Bool) -> f a c -> f b d -> Bool)
-> Eq2 f
$cliftEq2 :: forall (bi :: * -> * -> *) a b c d.
Eq2 bi =>
(a -> b -> Bool)
-> (c -> d -> Bool) -> Biap bi a c -> Biap bi b d -> Bool
liftEq2 :: forall a b c d.
(a -> b -> Bool)
-> (c -> d -> Bool) -> Biap bi a c -> Biap bi b d -> Bool
Eq2
, Eq2 (Biap bi)
(Eq2 (Biap bi), forall a. Ord a => Ord1 (Biap bi a)) =>
(forall a b c d.
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> Biap bi a c -> Biap bi b d -> Ordering)
-> Ord2 (Biap bi)
forall a. Ord a => Ord1 (Biap bi a)
forall a b c d.
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> Biap bi a c -> Biap bi b d -> Ordering
forall (bi :: * -> * -> *). Ord2 bi => Eq2 (Biap bi)
forall (bi :: * -> * -> *) a. (Ord2 bi, Ord a) => Ord1 (Biap bi a)
forall (bi :: * -> * -> *) a b c d.
Ord2 bi =>
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> Biap bi a c -> Biap bi b d -> Ordering
forall (f :: * -> * -> *).
(Eq2 f, forall a. Ord a => Ord1 (f a)) =>
(forall a b c d.
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> f a c -> f b d -> Ordering)
-> Ord2 f
$cliftCompare2 :: forall (bi :: * -> * -> *) a b c d.
Ord2 bi =>
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> Biap bi a c -> Biap bi b d -> Ordering
liftCompare2 :: forall a b c d.
(a -> b -> Ordering)
-> (c -> d -> Ordering) -> Biap bi a c -> Biap bi b d -> Ordering
Ord2
)
instance Bitraversable bi => Bitraversable (Biap bi) where
bitraverse :: forall (f :: * -> *) a c b d.
Applicative f =>
(a -> f c) -> (b -> f d) -> Biap bi a b -> f (Biap bi c d)
bitraverse a -> f c
f b -> f d
g (Biap bi a b
as) = bi c d -> Biap bi c d
forall (bi :: * -> * -> *) a b. bi a b -> Biap bi a b
Biap (bi c d -> Biap bi c d) -> f (bi c d) -> f (Biap bi c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> bi a b -> f (bi c d)
forall (f :: * -> *) a c b d.
Applicative f =>
(a -> f c) -> (b -> f d) -> bi a b -> f (bi 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 d
g bi a b
as
instance (Biapplicative bi, S.Semigroup a, S.Semigroup b) => S.Semigroup (Biap bi a b) where
<> :: Biap bi a b -> Biap bi a b -> Biap bi a b
(<>) = (a -> a -> a)
-> (b -> b -> b) -> Biap bi a b -> Biap bi a b -> Biap bi a b
forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
forall (p :: * -> * -> *) a b c d e f.
Biapplicative p =>
(a -> b -> c) -> (d -> e -> f) -> p a d -> p b e -> p c f
biliftA2 a -> a -> a
forall a. Semigroup a => a -> a -> a
(S.<>) b -> b -> b
forall a. Semigroup a => a -> a -> a
(S.<>)
instance (Biapplicative bi, Monoid a, Monoid b) => Monoid (Biap bi a b) where
mempty :: Biap bi a b
mempty = a -> b -> Biap bi a b
forall a b. a -> b -> Biap bi a b
forall (p :: * -> * -> *) a b. Biapplicative p => a -> b -> p a b
bipure a
forall a. Monoid a => a
mempty b
forall a. Monoid a => a
mempty
#if !(MIN_VERSION_base(4,11,0))
mappend = biliftA2 mappend mappend
#endif
instance (Biapplicative bi, Bounded a, Bounded b) => Bounded (Biap bi a b) where
minBound :: Biap bi a b
minBound = a -> b -> Biap bi a b
forall a b. a -> b -> Biap bi a b
forall (p :: * -> * -> *) a b. Biapplicative p => a -> b -> p a b
bipure a
forall a. Bounded a => a
minBound b
forall a. Bounded a => a
minBound
maxBound :: Biap bi a b
maxBound = a -> b -> Biap bi a b
forall a b. a -> b -> Biap bi a b
forall (p :: * -> * -> *) a b. Biapplicative p => a -> b -> p a b
bipure a
forall a. Bounded a => a
maxBound b
forall a. Bounded a => a
maxBound
instance (Biapplicative bi, Num a, Num b) => Num (Biap bi a b) where
+ :: Biap bi a b -> Biap bi a b -> Biap bi a b
(+) = (a -> a -> a)
-> (b -> b -> b) -> Biap bi a b -> Biap bi a b -> Biap bi a b
forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
forall (p :: * -> * -> *) a b c d e f.
Biapplicative p =>
(a -> b -> c) -> (d -> e -> f) -> p a d -> p b e -> p c f
biliftA2 a -> a -> a
forall a. Num a => a -> a -> a
(+) b -> b -> b
forall a. Num a => a -> a -> a
(+)
* :: Biap bi a b -> Biap bi a b -> Biap bi a b
(*) = (a -> a -> a)
-> (b -> b -> b) -> Biap bi a b -> Biap bi a b -> Biap bi a b
forall a b c d e f.
(a -> b -> c)
-> (d -> e -> f) -> Biap bi a d -> Biap bi b e -> Biap bi c f
forall (p :: * -> * -> *) a b c d e f.
Biapplicative p =>
(a -> b -> c) -> (d -> e -> f) -> p a d -> p b e -> p c f
biliftA2 a -> a -> a
forall a. Num a => a -> a -> a
(*) b -> b -> b
forall a. Num a => a -> a -> a
(*)
negate :: Biap bi a b -> Biap bi a b
negate = (a -> a) -> (b -> b) -> Biap bi a b -> Biap bi a b
forall a b c d. (a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> a
forall a. Num a => a -> a
negate b -> b
forall a. Num a => a -> a
negate
abs :: Biap bi a b -> Biap bi a b
abs = (a -> a) -> (b -> b) -> Biap bi a b -> Biap bi a b
forall a b c d. (a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> a
forall a. Num a => a -> a
abs b -> b
forall a. Num a => a -> a
abs
signum :: Biap bi a b -> Biap bi a b
signum = (a -> a) -> (b -> b) -> Biap bi a b -> Biap bi a b
forall a b c d. (a -> b) -> (c -> d) -> Biap bi a c -> Biap bi b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> a
forall a. Num a => a -> a
signum b -> b
forall a. Num a => a -> a
signum
fromInteger :: Integer -> Biap bi a b
fromInteger Integer
n = a -> b -> Biap bi a b
forall a b. a -> b -> Biap bi a b
forall (p :: * -> * -> *) a b. Biapplicative p => a -> b -> p a b
bipure (Integer -> a
forall a. Num a => Integer -> a
fromInteger Integer
n) (Integer -> b
forall a. Num a => Integer -> a
fromInteger Integer
n)