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