summaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-11-04 20:23:44 -0500
committerJoe Crayne <joe@jerkface.net>2018-11-04 20:24:02 -0500
commit7e255f7695b700eefb06f7ec508464a2fbf5163a (patch)
tree85f7038f4b1d1f4e7c8c8a7a081819e44b9ad6ce /src/Crypto
parente0fc956953100a375ef1e325d8e5d53b96de0749 (diff)
Build fixes for GHC 8.6.1
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/Tox.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs
index 61a392e2..9b097c7e 100644
--- a/src/Crypto/Tox.hs
+++ b/src/Crypto/Tox.hs
@@ -470,8 +470,9 @@ instance Read Nonce32 where
470 '=':xs -> Right xs -- optional terminating '=' 470 '=':xs -> Right xs -- optional terminating '='
471 _ -> Right ss 471 _ -> Right ss
472 bs <- Base64.decode (C8.pack $ ds ++ ['=']) 472 bs <- Base64.decode (C8.pack $ ds ++ ['='])
473 guard $ B.length bs == 32 473 if B.length bs == 32
474 return [ (Nonce32 bs, ss') ] 474 then Right [ (Nonce32 bs, ss') ]
475 else Left "Insuffiicent base64 digits while parsing Nonce32."
475 476
476instance Serialize Nonce32 where 477instance Serialize Nonce32 where
477 get = Nonce32 <$> getBytes 32 478 get = Nonce32 <$> getBytes 32