diff options
Diffstat (limited to 'Presence/Logging.hs')
-rw-r--r-- | Presence/Logging.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Presence/Logging.hs b/Presence/Logging.hs new file mode 100644 index 00000000..b997d341 --- /dev/null +++ b/Presence/Logging.hs | |||
@@ -0,0 +1,25 @@ | |||
1 | {-# LANGUAGE RankNTypes #-} | ||
2 | module Logging where | ||
3 | |||
4 | import qualified Data.ByteString.Lazy.Char8 as L | ||
5 | import qualified Data.ByteString.Char8 as S | ||
6 | import qualified Data.Text.IO as Text | ||
7 | import qualified Data.Text as Text | ||
8 | import qualified Debug.Trace as Debug | ||
9 | |||
10 | debugL :: L.ByteString -> IO () | ||
11 | debugS :: S.ByteString -> IO () | ||
12 | debugStr :: String -> IO () | ||
13 | debugText :: Text.Text -> IO () | ||
14 | trace :: forall a. String -> a -> a | ||
15 | |||
16 | |||
17 | debugStr str = putStrLn str | ||
18 | |||
19 | debugL bs = L.putStrLn bs | ||
20 | |||
21 | debugS bs = S.putStrLn bs | ||
22 | |||
23 | debugText text = Text.putStrLn text | ||
24 | |||
25 | trace str a = Debug.trace str a | ||