Made the Plugin monad a Reader instead of a State since it can't change.
This commit is contained in:
parent
4ec66d2ad7
commit
a8c0c85787
7 changed files with 15 additions and 22 deletions
|
@ -1,7 +1,6 @@
|
|||
module Hsbot.Utils
|
||||
( addThreadIdToQuitMVar
|
||||
, delThreadIdFromQuitMVar
|
||||
, first
|
||||
, initTLSEnv
|
||||
, readCertificate
|
||||
, readPrivateKey
|
||||
|
@ -41,9 +40,6 @@ setGlobalQuitMVar status = do
|
|||
quitMv <- asks envQuitMv
|
||||
liftIO $ putMVar quitMv status
|
||||
|
||||
first :: (a, b, c) -> a
|
||||
first (a, _, _) = a
|
||||
|
||||
-- Helpers
|
||||
sendStr :: Handle -> Maybe TLSCtx -> String -> IO ()
|
||||
sendStr _ (Just ctx) msg = sendData ctx $ L.fromChunks [C.pack msg]
|
||||
|
|
Reference in a new issue