#if __GLASGOW_HASKELL__ >= 706
#endif
module TextShow.Data.Functor.Trans () where
import Data.Functor.Constant (Constant(..))
import Data.Functor.Reverse (Reverse(..))
import TextShow (TextShow(..), TextShow1(..), TextShow2(..),
Builder, showbPrec1, showbUnaryWith)
import TextShow.Utils (liftShowbUnaryWith)
liftShowbConstantPrec :: (Int -> a -> Builder) -> Int -> Constant a b -> Builder
liftShowbConstantPrec sp p (Constant x) = showbUnaryWith sp "Constant" p x
instance TextShow a => TextShow (Constant a b) where
showbPrec = liftShowbConstantPrec showbPrec
instance TextShow a => TextShow1 (Constant a) where
liftShowbPrec _ _ = liftShowbConstantPrec showbPrec
instance TextShow2 Constant where
liftShowbPrec2 sp _ _ _ = liftShowbConstantPrec sp
instance (TextShow1 f, TextShow a) => TextShow (Reverse f a) where
showbPrec = showbPrec1
instance TextShow1 f => TextShow1 (Reverse f) where
liftShowbPrec sp sl p (Reverse x) = liftShowbUnaryWith sp sl "Reverse" p x