diff options
author | James Crayne <jim.crayne@gmail.com> | 2019-09-28 13:43:29 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 19:27:53 -0500 |
commit | 11987749fc6e6d3e53ea737d46d5ab13a16faeb8 (patch) | |
tree | 5716463275c2d3e902889db619908ded2a73971c /dht/Presence/Logging.hs | |
parent | add2c76bced51fde5e9917e7449ef52be70faf87 (diff) |
Factor out some new libraries
word64-map:
Data.Word64Map
network-addr:
Network.Address
tox-crypto:
Crypto.Tox
lifted-concurrent:
Control.Concurrent.Lifted.Instrument
Control.Concurrent.Async.Lifted.Instrument
psq-wrap:
Data.Wrapper.PSQInt
Data.Wrapper.PSQ
minmax-psq:
Data.MinMaxPSQ
tasks:
Control.Concurrent.Tasks
kad:
Network.Kademlia
Network.Kademlia.Bootstrap
Network.Kademlia.Routing
Network.Kademlia.CommonAPI
Network.Kademlia.Persistence
Network.Kademlia.Search
Diffstat (limited to 'dht/Presence/Logging.hs')
-rw-r--r-- | dht/Presence/Logging.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dht/Presence/Logging.hs b/dht/Presence/Logging.hs new file mode 100644 index 00000000..b997d341 --- /dev/null +++ b/dht/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 | ||