module TextShow.Control.Concurrent (
showbThreadIdPrec
, showbThreadStatusPrec
, showbBlockReason
) where
import Data.Text.Lazy.Builder (Builder)
import GHC.Conc (BlockReason, ThreadId, ThreadStatus)
import TextShow.Classes (TextShow(showb, showbPrec), FromStringShow(..))
import TextShow.TH.Internal (deriveTextShow)
#include "inline.h"
showbThreadIdPrec :: Int -> ThreadId -> Builder
showbThreadIdPrec p = showbPrec p . FromStringShow
showbThreadStatusPrec :: Int -> ThreadStatus -> Builder
showbThreadStatusPrec = showbPrec
showbBlockReason :: BlockReason -> Builder
showbBlockReason = showb
instance TextShow ThreadId where
showbPrec = showbThreadIdPrec
INLINE_INST_FUN(showbPrec)
$(deriveTextShow ''ThreadStatus)
$(deriveTextShow ''BlockReason)