{-# LANGUAGE FlexibleContexts #-}
module TextShow.Debug.Trace.Generic (
genericTraceTextShow
, genericTraceTextShowId
, genericTraceTextShowM
) where
import Generics.Deriving.Base (Generic, Rep)
import Prelude ()
import Prelude.Compat
import TextShow.Debug.Trace
import TextShow.Generic (GTextShowT, Zero, genericShowt)
genericTraceTextShow :: (Generic a, GTextShowT Zero (Rep a)) => a -> b -> b
genericTraceTextShow = tracet . genericShowt
genericTraceTextShowId :: (Generic a, GTextShowT Zero (Rep a)) => a -> a
genericTraceTextShowId a = tracet (genericShowt a) a
genericTraceTextShowM :: (Generic a, GTextShowT Zero (Rep a), Applicative f) => a -> f ()
genericTraceTextShowM = tracetM . genericShowt