module Text.Show.Text.Control.Applicative.Trans (
showbBackwardsPrec
, showbLiftPrec
) where
import Control.Applicative.Backwards (Backwards(..))
import Control.Applicative.Lift (Lift(..))
import Prelude hiding (Show)
import Text.Show.Text (Show(showbPrec), Show1(showbPrec1), Builder,
showbUnary, showbUnary1)
#include "inline.h"
showbBackwardsPrec :: (Show1 f, Show a) => Int -> Backwards f a -> Builder
showbBackwardsPrec p (Backwards x) = showbUnary1 "Backwards" p x
showbLiftPrec :: (Show1 f, Show a) => Int -> Lift f a -> Builder
showbLiftPrec p (Pure x) = showbUnary "Pure" p x
showbLiftPrec p (Other y) = showbUnary1 "Other" p y
instance (Show1 f, Show a) => Show (Backwards f a) where
showbPrec = showbBackwardsPrec
INLINE_INST_FUN(showbPrec)
instance Show1 f => Show1 (Backwards f) where
showbPrec1 = showbBackwardsPrec
INLINE_INST_FUN(showbPrec1)
instance (Show1 f, Show a) => Show (Lift f a) where
showbPrec = showbLiftPrec
INLINE_INST_FUN(showbPrec)
instance Show1 f => Show1 (Lift f) where
showbPrec1 = showbLiftPrec
INLINE_INST_FUN(showbPrec1)