From 84585b7a7e8f1ad1d89f1e5c0aa4f6e823316621 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 30 Jun 2021 13:21:01 +0200 Subject: Get rid of utf8-string Turns out that Char8.unpack is enough for our purposes, so we don't need the utf8-string module. --- src/Cana/Protocol.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Cana/Protocol.hs b/src/Cana/Protocol.hs index 1a5f48e..be80f21 100644 --- a/src/Cana/Protocol.hs +++ b/src/Cana/Protocol.hs @@ -43,8 +43,8 @@ import Data.Char import Data.String import Text.Read import qualified Data.ByteString.Lazy as B +import qualified Data.ByteString.Lazy.Char8 as C import Data.ByteString.Lazy.Search -import qualified Data.ByteString.Lazy.UTF8 as UTF import Data.ByteString.Builder import Data.X509 (CertificateChain) import Network.URI @@ -222,7 +222,7 @@ parseResponse text = do header = fromMaybe header' $ B.stripSuffix headerDelim header' (code, meta') = B.break (== codeDelim) header meta = B.dropWhile (== codeDelim) meta' - statusCode <- readMaybe (UTF.toString code) >>= fromInt + statusCode <- readMaybe (C.unpack code) >>= fromInt return GeminiResponse { responseStatus = statusCode , responseMeta = meta -- cgit v1.2.3