module TextShow.Data.Data (
showbConstr
, showbConstrRepPrec
, showbDataRepPrec
, showbDataTypePrec
, showbFixity
) where
import Data.Data (Constr, ConstrRep, DataRep, DataType, Fixity, showConstr)
import Data.Text.Lazy.Builder (Builder, fromString)
import TextShow.Classes (TextShow(showb, showbPrec))
import TextShow.Data.List ()
import TextShow.Data.Ratio ()
import TextShow.TH.Internal (deriveTextShow)
#include "inline.h"
showbDataTypePrec :: Int -> DataType -> Builder
showbDataTypePrec = showbPrec
showbDataRepPrec :: Int -> DataRep -> Builder
showbDataRepPrec = showbPrec
showbConstr :: Constr -> Builder
showbConstr = fromString . showConstr
showbFixity :: Fixity -> Builder
showbFixity = showb
showbConstrRepPrec :: Int -> ConstrRep -> Builder
showbConstrRepPrec = showbPrec
$(deriveTextShow ''DataType)
$(deriveTextShow ''DataRep)
$(deriveTextShow ''ConstrRep)
$(deriveTextShow ''Fixity)
instance TextShow Constr where
showb = showbConstr
INLINE_INST_FUN(showb)