aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Aux.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ssb/Aux.hs')
-rw-r--r--src/Ssb/Aux.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Ssb/Aux.hs b/src/Ssb/Aux.hs
index 4be61b9..39a09b8 100644
--- a/src/Ssb/Aux.hs
+++ b/src/Ssb/Aux.hs
@@ -3,7 +3,8 @@ module Ssb.Aux where
import Protolude
import Data.Aeson as Aeson
-import Data.ByteString.Lazy as BS (toStrict)
+import Data.ByteString.Lazy as BS (toStrict)
+import Data.ByteString.Char8 as BS (pack, unpack)
import Data.Default
import Data.Serialize as Serialize
import Data.Either.Combinators ( mapLeft
@@ -59,9 +60,9 @@ command cmd input output = do
hSetBinaryMode hErr False
let loop = do
v <- atomically $ takeTMVar input
- hPutStr hIn (toS v :: [Char])
+ hPutStr hIn (BS.unpack v :: [Char])
hFlush hIn
v' <- hGetLine hOut
- atomically $ putTMVar output (toS v')
+ atomically $ putTMVar output (BS.pack v')
loop
loop