{-# LANGUAGE CPP #-}
module Debug.Pretty.Simple
(
pTrace
, pTraceId
, pTraceShow
, pTraceShowId
, pTraceIO
, pTraceM
, pTraceShowM
, pTraceStack
, pTraceEvent
, pTraceEventIO
, pTraceMarker
, pTraceMarkerIO
, pTraceForceColor
, pTraceIdForceColor
, pTraceShowForceColor
, pTraceShowIdForceColor
, pTraceMForceColor
, pTraceShowMForceColor
, pTraceStackForceColor
, pTraceEventForceColor
, pTraceEventIOForceColor
, pTraceMarkerForceColor
, pTraceMarkerIOForceColor
, pTraceIOForceColor
, pTraceNoColor
, pTraceIdNoColor
, pTraceShowNoColor
, pTraceShowIdNoColor
, pTraceMNoColor
, pTraceShowMNoColor
, pTraceStackNoColor
, pTraceEventNoColor
, pTraceEventIONoColor
, pTraceMarkerNoColor
, pTraceMarkerIONoColor
, pTraceIONoColor
, pTraceOpt
, pTraceIdOpt
, pTraceShowOpt
, pTraceShowIdOpt
, pTraceOptIO
, pTraceOptM
, pTraceShowOptM
, pTraceStackOpt
, pTraceEventOpt
, pTraceEventOptIO
, pTraceMarkerOpt
, pTraceMarkerOptIO
) where
import Control.Monad ((<=<))
import Data.Text.Lazy (Text, unpack)
import Debug.Trace
(trace, traceEvent, traceEventIO, traceIO, traceM, traceMarker,
traceMarkerIO, traceStack)
import System.IO (stderr)
import System.IO.Unsafe (unsafePerformIO)
import Text.Pretty.Simple
(CheckColorTty(..), OutputOptions, pStringOpt,
defaultOutputOptionsNoColor, defaultOutputOptionsDarkBg)
import Text.Pretty.Simple.Internal (hCheckTTY)
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
pTraceIO :: String -> IO ()
pTraceIO :: String -> IO ()
pTraceIO = CheckColorTty -> OutputOptions -> String -> IO ()
pTraceOptIO CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTrace :: String -> a -> a
pTrace :: String -> a -> a
pTrace = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceId :: String -> String
pTraceId :: String -> String
pTraceId = CheckColorTty -> OutputOptions -> String -> String
pTraceIdOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceShow :: (Show a) => a -> b -> b
pTraceShow :: a -> b -> b
pTraceShow = CheckColorTty -> OutputOptions -> a -> b -> b
forall a b. Show a => CheckColorTty -> OutputOptions -> a -> b -> b
pTraceShowOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceShowId :: (Show a) => a -> a
pTraceShowId :: a -> a
pTraceShowId = CheckColorTty -> OutputOptions -> a -> a
forall a. Show a => CheckColorTty -> OutputOptions -> a -> a
pTraceShowIdOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
#if __GLASGOW_HASKELL__ < 800
pTraceM :: (Monad f) => String -> f ()
#else
pTraceM :: (Applicative f) => String -> f ()
#endif
pTraceM :: String -> f ()
pTraceM = CheckColorTty -> OutputOptions -> String -> f ()
forall (f :: * -> *).
Applicative f =>
CheckColorTty -> OutputOptions -> String -> f ()
pTraceOptM CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
#if __GLASGOW_HASKELL__ < 800
pTraceShowM :: (Show a, Monad f) => a -> f ()
#else
pTraceShowM :: (Show a, Applicative f) => a -> f ()
#endif
pTraceShowM :: a -> f ()
pTraceShowM = CheckColorTty -> OutputOptions -> a -> f ()
forall a (f :: * -> *).
(Show a, Applicative f) =>
CheckColorTty -> OutputOptions -> a -> f ()
pTraceShowOptM CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceStack :: String -> a -> a
pTraceStack :: String -> a -> a
pTraceStack = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceStackOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceEvent :: String -> a -> a
pTraceEvent :: String -> a -> a
pTraceEvent = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceEventOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceEventIO :: String -> IO ()
pTraceEventIO :: String -> IO ()
pTraceEventIO = CheckColorTty -> OutputOptions -> String -> IO ()
pTraceEventOptIO CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceMarker :: String -> a -> a
pTraceMarker :: String -> a -> a
pTraceMarker = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceMarkerOpt CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceMarkerIO :: String -> IO ()
pTraceMarkerIO :: String -> IO ()
pTraceMarkerIO = CheckColorTty -> OutputOptions -> String -> IO ()
pTraceMarkerOptIO CheckColorTty
CheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pStringTTYOptIO :: CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO :: CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions String
v = do
OutputOptions
realOutputOpts <-
case CheckColorTty
checkColorTty of
CheckColorTty
CheckColorTty -> Handle -> OutputOptions -> IO OutputOptions
forall (m :: * -> *).
MonadIO m =>
Handle -> OutputOptions -> m OutputOptions
hCheckTTY Handle
stderr OutputOptions
outputOptions
CheckColorTty
NoCheckColorTty -> OutputOptions -> IO OutputOptions
forall (f :: * -> *) a. Applicative f => a -> f a
pure OutputOptions
outputOptions
Text -> IO Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> IO Text) -> Text -> IO Text
forall a b. (a -> b) -> a -> b
$ OutputOptions -> String -> Text
pStringOpt OutputOptions
realOutputOpts String
v
pStringTTYOpt :: CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt :: CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
IO Text -> Text
forall a. IO a -> a
unsafePerformIO (IO Text -> Text) -> (String -> IO Text) -> String -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions
pShowTTYOptIO :: Show a => CheckColorTty -> OutputOptions -> a -> IO Text
pShowTTYOptIO :: CheckColorTty -> OutputOptions -> a -> IO Text
pShowTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions =
CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions (String -> IO Text) -> (a -> String) -> a -> IO Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
pShowTTYOpt :: Show a => CheckColorTty -> OutputOptions -> a -> Text
pShowTTYOpt :: CheckColorTty -> OutputOptions -> a -> Text
pShowTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
IO Text -> Text
forall a. IO a -> a
unsafePerformIO (IO Text -> Text) -> (a -> IO Text) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> a -> IO Text
forall a. Show a => CheckColorTty -> OutputOptions -> a -> IO Text
pShowTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceForceColor :: String -> a -> a
pTraceForceColor :: String -> a -> a
pTraceForceColor = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceIdForceColor :: String -> String
pTraceIdForceColor :: String -> String
pTraceIdForceColor = CheckColorTty -> OutputOptions -> String -> String
pTraceIdOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceShowForceColor :: (Show a) => a -> b -> b
pTraceShowForceColor :: a -> b -> b
pTraceShowForceColor = CheckColorTty -> OutputOptions -> a -> b -> b
forall a b. Show a => CheckColorTty -> OutputOptions -> a -> b -> b
pTraceShowOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceShowIdForceColor :: (Show a) => a -> a
pTraceShowIdForceColor :: a -> a
pTraceShowIdForceColor =
CheckColorTty -> OutputOptions -> a -> a
forall a. Show a => CheckColorTty -> OutputOptions -> a -> a
pTraceShowIdOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
#if __GLASGOW_HASKELL__ < 800
pTraceMForceColor :: (Monad f) => String -> f ()
#else
pTraceMForceColor :: (Applicative f) => String -> f ()
#endif
pTraceMForceColor :: String -> f ()
pTraceMForceColor = CheckColorTty -> OutputOptions -> String -> f ()
forall (f :: * -> *).
Applicative f =>
CheckColorTty -> OutputOptions -> String -> f ()
pTraceOptM CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
#if __GLASGOW_HASKELL__ < 800
pTraceShowMForceColor :: (Show a, Monad f) => a -> f ()
#else
pTraceShowMForceColor :: (Show a, Applicative f) => a -> f ()
#endif
pTraceShowMForceColor :: a -> f ()
pTraceShowMForceColor =
CheckColorTty -> OutputOptions -> a -> f ()
forall a (f :: * -> *).
(Show a, Applicative f) =>
CheckColorTty -> OutputOptions -> a -> f ()
pTraceShowOptM CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceStackForceColor :: String -> a -> a
pTraceStackForceColor :: String -> a -> a
pTraceStackForceColor =
CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceStackOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceEventForceColor :: String -> a -> a
pTraceEventForceColor :: String -> a -> a
pTraceEventForceColor =
CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceEventOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceEventIOForceColor :: String -> IO ()
pTraceEventIOForceColor :: String -> IO ()
pTraceEventIOForceColor =
CheckColorTty -> OutputOptions -> String -> IO ()
pTraceEventOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceMarkerForceColor :: String -> a -> a
pTraceMarkerForceColor :: String -> a -> a
pTraceMarkerForceColor =
CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceMarkerOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceMarkerIOForceColor :: String -> IO ()
pTraceMarkerIOForceColor :: String -> IO ()
pTraceMarkerIOForceColor =
CheckColorTty -> OutputOptions -> String -> IO ()
pTraceMarkerOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceIOForceColor :: String -> IO ()
pTraceIOForceColor :: String -> IO ()
pTraceIOForceColor = CheckColorTty -> OutputOptions -> String -> IO ()
pTraceOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsDarkBg
pTraceNoColor :: String -> a -> a
pTraceNoColor :: String -> a -> a
pTraceNoColor = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceIdNoColor :: String -> String
pTraceIdNoColor :: String -> String
pTraceIdNoColor = CheckColorTty -> OutputOptions -> String -> String
pTraceIdOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceShowNoColor :: (Show a) => a -> b -> b
pTraceShowNoColor :: a -> b -> b
pTraceShowNoColor = CheckColorTty -> OutputOptions -> a -> b -> b
forall a b. Show a => CheckColorTty -> OutputOptions -> a -> b -> b
pTraceShowOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceShowIdNoColor :: (Show a) => a -> a
pTraceShowIdNoColor :: a -> a
pTraceShowIdNoColor =
CheckColorTty -> OutputOptions -> a -> a
forall a. Show a => CheckColorTty -> OutputOptions -> a -> a
pTraceShowIdOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
#if __GLASGOW_HASKELL__ < 800
pTraceMNoColor :: (Monad f) => String -> f ()
#else
pTraceMNoColor :: (Applicative f) => String -> f ()
#endif
pTraceMNoColor :: String -> f ()
pTraceMNoColor = CheckColorTty -> OutputOptions -> String -> f ()
forall (f :: * -> *).
Applicative f =>
CheckColorTty -> OutputOptions -> String -> f ()
pTraceOptM CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
#if __GLASGOW_HASKELL__ < 800
pTraceShowMNoColor :: (Show a, Monad f) => a -> f ()
#else
pTraceShowMNoColor :: (Show a, Applicative f) => a -> f ()
#endif
pTraceShowMNoColor :: a -> f ()
pTraceShowMNoColor = CheckColorTty -> OutputOptions -> a -> f ()
forall a (f :: * -> *).
(Show a, Applicative f) =>
CheckColorTty -> OutputOptions -> a -> f ()
pTraceShowOptM CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceStackNoColor :: String -> a -> a
pTraceStackNoColor :: String -> a -> a
pTraceStackNoColor = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceStackOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceEventNoColor :: String -> a -> a
pTraceEventNoColor :: String -> a -> a
pTraceEventNoColor = CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceEventOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceEventIONoColor :: String -> IO ()
pTraceEventIONoColor :: String -> IO ()
pTraceEventIONoColor =
CheckColorTty -> OutputOptions -> String -> IO ()
pTraceEventOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceMarkerNoColor :: String -> a -> a
pTraceMarkerNoColor :: String -> a -> a
pTraceMarkerNoColor =
CheckColorTty -> OutputOptions -> String -> a -> a
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceMarkerOpt CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceMarkerIONoColor :: String -> IO ()
pTraceMarkerIONoColor :: String -> IO ()
pTraceMarkerIONoColor =
CheckColorTty -> OutputOptions -> String -> IO ()
pTraceMarkerOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceIONoColor :: String -> IO ()
pTraceIONoColor :: String -> IO ()
pTraceIONoColor = CheckColorTty -> OutputOptions -> String -> IO ()
pTraceOptIO CheckColorTty
NoCheckColorTty OutputOptions
defaultOutputOptionsNoColor
pTraceOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> a -> a
forall a. String -> a -> a
trace (String -> a -> a) -> (String -> String) -> String -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (String -> Text) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceIdOpt :: CheckColorTty -> OutputOptions -> String -> String
pTraceIdOpt :: CheckColorTty -> OutputOptions -> String -> String
pTraceIdOpt CheckColorTty
checkColorTty OutputOptions
outputOptions String
a =
CheckColorTty -> OutputOptions -> String -> String -> String
forall a. CheckColorTty -> OutputOptions -> String -> a -> a
pTraceOpt CheckColorTty
checkColorTty OutputOptions
outputOptions String
a String
a
pTraceShowOpt :: (Show a) => CheckColorTty -> OutputOptions -> a -> b -> b
pTraceShowOpt :: CheckColorTty -> OutputOptions -> a -> b -> b
pTraceShowOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> b -> b
forall a. String -> a -> a
trace (String -> b -> b) -> (a -> String) -> a -> b -> b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (a -> Text) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> a -> Text
forall a. Show a => CheckColorTty -> OutputOptions -> a -> Text
pShowTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceShowIdOpt :: (Show a) => CheckColorTty -> OutputOptions -> a -> a
pTraceShowIdOpt :: CheckColorTty -> OutputOptions -> a -> a
pTraceShowIdOpt CheckColorTty
checkColorTty OutputOptions
outputOptions a
a =
String -> a -> a
forall a. String -> a -> a
trace (Text -> String
unpack (Text -> String) -> Text -> String
forall a b. (a -> b) -> a -> b
$ CheckColorTty -> OutputOptions -> a -> Text
forall a. Show a => CheckColorTty -> OutputOptions -> a -> Text
pShowTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions a
a) a
a
pTraceOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> IO ()
traceIO (String -> IO ()) -> (Text -> String) -> Text -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> IO ()) -> (String -> IO Text) -> String -> IO ()
forall (m :: * -> *) b c a.
Monad m =>
(b -> m c) -> (a -> m b) -> a -> m c
<=< CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions
#if __GLASGOW_HASKELL__ < 800
pTraceOptM :: (Monad f) => CheckColorTty -> OutputOptions -> String -> f ()
#else
pTraceOptM ::
(Applicative f) => CheckColorTty -> OutputOptions -> String -> f ()
#endif
pTraceOptM :: CheckColorTty -> OutputOptions -> String -> f ()
pTraceOptM CheckColorTty
checkColorTty OutputOptions
outputOptions String
string =
String -> f () -> f ()
forall a. String -> a -> a
trace (Text -> String
unpack (Text -> String) -> Text -> String
forall a b. (a -> b) -> a -> b
$ CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions String
string) (f () -> f ()) -> f () -> f ()
forall a b. (a -> b) -> a -> b
$ () -> f ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ()
#if __GLASGOW_HASKELL__ < 800
pTraceShowOptM ::
(Show a, Monad f) => CheckColorTty -> OutputOptions -> a -> f ()
#else
pTraceShowOptM ::
(Show a, Applicative f) => CheckColorTty -> OutputOptions -> a -> f ()
#endif
pTraceShowOptM :: CheckColorTty -> OutputOptions -> a -> f ()
pTraceShowOptM CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> f ()
forall (f :: * -> *). Applicative f => String -> f ()
traceM (String -> f ()) -> (a -> String) -> a -> f ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (a -> Text) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> a -> Text
forall a. Show a => CheckColorTty -> OutputOptions -> a -> Text
pShowTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceStackOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceStackOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceStackOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> a -> a
forall a. String -> a -> a
traceStack (String -> a -> a) -> (String -> String) -> String -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (String -> Text) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceEventOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceEventOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceEventOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> a -> a
forall a. String -> a -> a
traceEvent (String -> a -> a) -> (String -> String) -> String -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (String -> Text) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceEventOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceEventOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceEventOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> IO ()
traceEventIO (String -> IO ()) -> (Text -> String) -> Text -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> IO ()) -> (String -> IO Text) -> String -> IO ()
forall (m :: * -> *) b c a.
Monad m =>
(b -> m c) -> (a -> m b) -> a -> m c
<=< CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceMarkerOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceMarkerOpt :: CheckColorTty -> OutputOptions -> String -> a -> a
pTraceMarkerOpt CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> a -> a
forall a. String -> a -> a
traceMarker (String -> a -> a) -> (String -> String) -> String -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> String) -> (String -> Text) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CheckColorTty -> OutputOptions -> String -> Text
pStringTTYOpt CheckColorTty
checkColorTty OutputOptions
outputOptions
pTraceMarkerOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceMarkerOptIO :: CheckColorTty -> OutputOptions -> String -> IO ()
pTraceMarkerOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions =
String -> IO ()
traceMarkerIO (String -> IO ()) -> (Text -> String) -> Text -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> String
unpack (Text -> IO ()) -> (String -> IO Text) -> String -> IO ()
forall (m :: * -> *) b c a.
Monad m =>
(b -> m c) -> (a -> m b) -> a -> m c
<=< CheckColorTty -> OutputOptions -> String -> IO Text
pStringTTYOptIO CheckColorTty
checkColorTty OutputOptions
outputOptions