#if MIN_VERSION_base(4,8,0)
#endif
module Text.Show.Text.Data.Monoid (
showbAllPrec
, showbAnyPrec
, showbDualPrec
, showbFirstPrec
, showbLastPrec
, showbProductPrec
, showbSumPrec
#if MIN_VERSION_base(4,8,0)
, showbAltPrec
#endif
) where
import Data.Monoid (All, Any, Dual, First, Last, Product, Sum)
import Data.Text.Lazy.Builder (Builder)
import Prelude hiding (Show)
import Text.Show.Text.Classes (Show(showbPrec), Show1(showbPrec1))
import Text.Show.Text.Data.Bool ()
import Text.Show.Text.Data.Maybe ()
import Text.Show.Text.TH.Internal (deriveShowPragmas, defaultInlineShowbPrec)
#if MIN_VERSION_base(4,8,0)
import Data.Monoid (Alt)
import Text.Show.Text.TH.Internal (mkShowbPrec)
#endif
#include "inline.h"
showbAllPrec :: Int -> All -> Builder
showbAllPrec = showbPrec
showbAnyPrec :: Int -> Any -> Builder
showbAnyPrec = showbPrec
showbDualPrec :: Show a => Int -> Dual a -> Builder
showbDualPrec = showbPrec
showbFirstPrec :: Show a => Int -> First a -> Builder
showbFirstPrec = showbPrec
showbLastPrec :: Show a => Int -> Last a -> Builder
showbLastPrec = showbPrec
showbProductPrec :: Show a => Int -> Product a -> Builder
showbProductPrec = showbPrec
showbSumPrec :: Show a => Int -> Sum a -> Builder
showbSumPrec = showbPrec
#if MIN_VERSION_base(4,8,0)
showbAltPrec :: Show (f a) => Int -> Alt f a -> Builder
showbAltPrec = showbPrec
#endif
$(deriveShowPragmas defaultInlineShowbPrec ''All)
$(deriveShowPragmas defaultInlineShowbPrec ''Any)
$(deriveShowPragmas defaultInlineShowbPrec ''Dual)
$(deriveShowPragmas defaultInlineShowbPrec ''First)
$(deriveShowPragmas defaultInlineShowbPrec ''Last)
$(deriveShowPragmas defaultInlineShowbPrec ''Product)
$(deriveShowPragmas defaultInlineShowbPrec ''Sum)
#if MIN_VERSION_base(4,8,0)
instance Show (f a) => Show (Alt f a) where
showbPrec = $(mkShowbPrec ''Alt)
#endif
instance Show1 Dual where
showbPrec1 = showbPrec
INLINE_INST_FUN(showbPrec1)
instance Show1 First where
showbPrec1 = showbPrec
INLINE_INST_FUN(showbPrec1)
instance Show1 Last where
showbPrec1 = showbPrec
INLINE_INST_FUN(showbPrec1)
instance Show1 Product where
showbPrec1 = showbPrec
INLINE_INST_FUN(showbPrec1)
instance Show1 Sum where
showbPrec1 = showbPrec
INLINE_INST_FUN(showbPrec1)