#if MIN_VERSION_base(4,8,0)
#endif
module TextShow.Data.Monoid (
showbAllPrec
, showbAnyPrec
, showbDualPrecWith
, showbFirstPrecWith
, showbLastPrecWith
, showbProductPrecWith
, showbSumPrecWith
#if MIN_VERSION_base(4,8,0)
, showbAltPrec
, showbAltPrecWith
#endif
) where
import Data.Monoid.Compat (All, Any, Dual, First, Last, Product, Sum)
import Data.Text.Lazy.Builder (Builder)
import TextShow.Classes (TextShow(showbPrec), showbPrecWith)
import TextShow.Data.Bool ()
import TextShow.Data.Maybe ()
import TextShow.TH.Internal (deriveTextShow, deriveTextShow1)
#if MIN_VERSION_base(4,8,0)
import Data.Monoid (Alt)
import TextShow.Classes (TextShow1)
import TextShow.TH.Internal (makeShowbPrec)
#endif
#include "inline.h"
showbAllPrec :: Int -> All -> Builder
showbAllPrec = showbPrec
showbAnyPrec :: Int -> Any -> Builder
showbAnyPrec = showbPrec
showbDualPrecWith :: (Int -> a -> Builder) -> Int -> Dual a -> Builder
showbDualPrecWith = showbPrecWith
showbFirstPrecWith :: (Int -> a -> Builder) -> Int -> First a -> Builder
showbFirstPrecWith = showbPrecWith
showbLastPrecWith :: (Int -> a -> Builder) -> Int -> Last a -> Builder
showbLastPrecWith = showbPrecWith
showbProductPrecWith :: (Int -> a -> Builder) -> Int -> Product a -> Builder
showbProductPrecWith = showbPrecWith
showbSumPrecWith :: (Int -> a -> Builder) -> Int -> Sum a -> Builder
showbSumPrecWith = showbPrecWith
#if MIN_VERSION_base(4,8,0)
showbAltPrec :: TextShow (f a) => Int -> Alt f a -> Builder
showbAltPrec = showbPrec
showbAltPrecWith :: TextShow1 f => (Int -> a -> Builder) -> Int -> Alt f a -> Builder
showbAltPrecWith = showbPrecWith
#endif
$(deriveTextShow ''All)
$(deriveTextShow ''Any)
$(deriveTextShow ''Dual)
$(deriveTextShow1 ''Dual)
$(deriveTextShow ''First)
$(deriveTextShow1 ''First)
$(deriveTextShow ''Last)
$(deriveTextShow1 ''Last)
$(deriveTextShow ''Product)
$(deriveTextShow1 ''Product)
$(deriveTextShow ''Sum)
$(deriveTextShow1 ''Sum)
#if MIN_VERSION_base(4,8,0)
instance TextShow (f a) => TextShow (Alt f a) where
showbPrec = $(makeShowbPrec ''Alt)
$(deriveTextShow1 ''Alt)
#endif