summaryrefslogtreecommitdiff
path: root/Presence/Util.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-09-09 17:21:56 -0400
committerJoe Crayne <joe@jerkface.net>2018-09-21 18:18:58 -0400
commit44553e7598cfea314f95d3380ea47dd4c688ba90 (patch)
tree66d1c9b88d6b087171864fc32f314506f6d87a70 /Presence/Util.hs
parent240338c4e45b7bde90ee78f7f82a35c4a43438f9 (diff)
Handle converting empty bytestring to Text.
Diffstat (limited to 'Presence/Util.hs')
-rw-r--r--Presence/Util.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Presence/Util.hs b/Presence/Util.hs
index a934cad7..a6e5b35f 100644
--- a/Presence/Util.hs
+++ b/Presence/Util.hs
@@ -44,7 +44,7 @@ textToLazyByteString :: Text -> L.ByteString
44textToLazyByteString s = L.fromChunks [Text.encodeUtf8 s] 44textToLazyByteString s = L.fromChunks [Text.encodeUtf8 s]
45 45
46lazyByteStringToText :: L.ByteString -> Text 46lazyByteStringToText :: L.ByteString -> Text
47lazyByteStringToText = (foldr1 (<>) . map Text.decodeUtf8 . L.toChunks) 47lazyByteStringToText = (foldr (<>) mempty . map Text.decodeUtf8 . L.toChunks)
48 48
49-- | for example: 2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net 49-- | for example: 2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net
50ip6literal :: Text -> Text 50ip6literal :: Text -> Text