module TextShow.Data.Bifunctor (
showbBiffPrec
, liftShowbBiffPrec2
, showbClownPrec
, liftShowbClownPrec
, showbFixPrec
, liftShowbFixPrec
, showbFlipPrec
, liftShowbFlipPrec2
, showbJoinPrec
, liftShowbJoinPrec
, showbJokerPrec
, liftShowbJokerPrec
, showbProductPrec
, liftShowbProductPrec2
, showbSumPrec
, liftShowbSumPrec2
, showbTannenPrec
, liftShowbTannenPrec2
, showbWrappedBifunctorPrec
, liftShowbWrappedBifunctorPrec2
) where
import Data.Bifunctor.Biff (Biff)
import Data.Bifunctor.Clown (Clown)
import Data.Bifunctor.Fix (Fix(..))
import Data.Bifunctor.Flip (Flip)
import Data.Bifunctor.Join (Join(..))
import Data.Bifunctor.Joker (Joker)
import Data.Bifunctor.Product (Product)
import Data.Bifunctor.Sum (Sum)
import Data.Bifunctor.Tannen (Tannen)
import Data.Bifunctor.Wrapped (WrappedBifunctor)
import TextShow (TextShow(..), TextShow1(..), TextShow2(..), Builder)
import TextShow.TH (deriveTextShow2, makeShowbPrec, makeLiftShowbPrec)
showbBiffPrec :: TextShow (p (f a) (g b)) => Int -> Biff p f g a b -> Builder
showbBiffPrec = showbPrec
liftShowbBiffPrec2 :: (TextShow2 p, TextShow1 f, TextShow1 g)
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Biff p f g a b -> Builder
liftShowbBiffPrec2 = liftShowbPrec2
showbClownPrec :: TextShow (f a) => Int -> Clown f a b -> Builder
showbClownPrec = showbPrec
liftShowbClownPrec :: TextShow1 f => (Int -> a -> Builder) -> ([a] -> Builder)
-> Int -> Clown f a b -> Builder
liftShowbClownPrec sp sl = liftShowbPrec2 sp sl undefined undefined
showbFixPrec :: TextShow (p (Fix p a) a) => Int -> Fix p a -> Builder
showbFixPrec = showbPrec
liftShowbFixPrec :: TextShow2 p => (Int -> a -> Builder) -> ([a] -> Builder)
-> Int -> Fix p a -> Builder
liftShowbFixPrec sp sl p =
liftShowbPrec2 (liftShowbPrec sp sl) (liftShowbList sp sl) sp sl p . out
showbFlipPrec :: TextShow (p b a) => Int -> Flip p a b -> Builder
showbFlipPrec = showbPrec
liftShowbFlipPrec2 :: TextShow2 p
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Flip p a b -> Builder
liftShowbFlipPrec2 = liftShowbPrec2
showbJoinPrec :: TextShow (p a a) => Int -> Join p a -> Builder
showbJoinPrec = showbPrec
liftShowbJoinPrec :: TextShow2 p => (Int -> a -> Builder) -> ([a] -> Builder)
-> Int -> Join p a -> Builder
liftShowbJoinPrec sp sl p = liftShowbPrec2 sp sl sp sl p . runJoin
showbJokerPrec :: TextShow (g b) => Int -> Joker g a b -> Builder
showbJokerPrec = showbPrec
liftShowbJokerPrec :: TextShow1 g => (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Joker g a b -> Builder
liftShowbJokerPrec = liftShowbPrec2 undefined undefined
showbProductPrec :: (TextShow (f a b), TextShow (g a b))
=> Int -> Product f g a b -> Builder
showbProductPrec = showbPrec
liftShowbProductPrec2 :: (TextShow2 f, TextShow2 g)
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Product f g a b -> Builder
liftShowbProductPrec2 = liftShowbPrec2
showbSumPrec :: (TextShow (f a b), TextShow (g a b))
=> Int -> Sum f g a b -> Builder
showbSumPrec = showbPrec
liftShowbSumPrec2 :: (TextShow2 f, TextShow2 g)
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Sum f g a b -> Builder
liftShowbSumPrec2 = liftShowbPrec2
showbTannenPrec :: TextShow (f (p a b)) => Int -> Tannen f p a b -> Builder
showbTannenPrec = showbPrec
liftShowbTannenPrec2 :: (TextShow1 f, TextShow2 p)
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> Tannen f p a b -> Builder
liftShowbTannenPrec2 = liftShowbPrec2
showbWrappedBifunctorPrec :: TextShow (p a b) => Int -> WrappedBifunctor p a b -> Builder
showbWrappedBifunctorPrec = showbPrec
liftShowbWrappedBifunctorPrec2 :: TextShow2 p
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> (Int -> b -> Builder) -> ([b] -> Builder)
-> Int -> WrappedBifunctor p a b -> Builder
liftShowbWrappedBifunctorPrec2 = liftShowbPrec2
instance TextShow (p (f a) (g b)) => TextShow (Biff p f g a b) where
showbPrec = $(makeShowbPrec ''Biff)
instance (TextShow2 p, TextShow1 f, TextShow1 g, TextShow a) => TextShow1 (Biff p f g a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''Biff)
instance TextShow (f a) => TextShow (Clown f a b) where
showbPrec = $(makeShowbPrec ''Clown)
instance (TextShow1 f, TextShow a) => TextShow1 (Clown f a) where
liftShowbPrec = $(makeLiftShowbPrec ''Clown)
$(deriveTextShow2 ''Clown)
instance TextShow (p (Fix p a) a) => TextShow (Fix p a) where
showbPrec = $(makeShowbPrec ''Fix)
instance TextShow2 p => TextShow1 (Fix p) where
liftShowbPrec = liftShowbFixPrec
instance TextShow (p b a) => TextShow (Flip p a b) where
showbPrec = $(makeShowbPrec ''Flip)
instance (TextShow2 p, TextShow a) => TextShow1 (Flip p a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''Flip)
instance TextShow (p a a) => TextShow (Join p a) where
showbPrec = $(makeShowbPrec ''Join)
instance TextShow2 p => TextShow1 (Join p) where
liftShowbPrec = liftShowbJoinPrec
instance TextShow (g b) => TextShow (Joker g a b) where
showbPrec = $(makeShowbPrec ''Joker)
instance TextShow1 g => TextShow1 (Joker g a) where
liftShowbPrec = $(makeLiftShowbPrec ''Joker)
$(deriveTextShow2 ''Joker)
instance (TextShow (f a b), TextShow (g a b)) => TextShow (Product f g a b) where
showbPrec = $(makeShowbPrec ''Product)
instance (TextShow2 f, TextShow2 g, TextShow a) => TextShow1 (Product f g a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''Product)
instance (TextShow (f a b), TextShow (g a b)) => TextShow (Sum f g a b) where
showbPrec = $(makeShowbPrec ''Sum)
instance (TextShow2 f, TextShow2 g, TextShow a) => TextShow1 (Sum f g a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''Sum)
instance TextShow (f (p a b)) => TextShow (Tannen f p a b) where
showbPrec = $(makeShowbPrec ''Tannen)
instance (TextShow1 f, TextShow2 p, TextShow a) => TextShow1 (Tannen f p a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''Tannen)
instance TextShow (p a b) => TextShow (WrappedBifunctor p a b) where
showbPrec = $(makeShowbPrec ''WrappedBifunctor)
instance (TextShow2 p, TextShow a) => TextShow1 (WrappedBifunctor p a) where
liftShowbPrec = liftShowbPrec2 showbPrec showbList
$(deriveTextShow2 ''WrappedBifunctor)