From 7e255f7695b700eefb06f7ec508464a2fbf5163a Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sun, 4 Nov 2018 20:23:44 -0500 Subject: Build fixes for GHC 8.6.1 --- src/Crypto/Tox.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Crypto') 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 '=':xs -> Right xs -- optional terminating '=' _ -> Right ss bs <- Base64.decode (C8.pack $ ds ++ ['=']) - guard $ B.length bs == 32 - return [ (Nonce32 bs, ss') ] + if B.length bs == 32 + then Right [ (Nonce32 bs, ss') ] + else Left "Insuffiicent base64 digits while parsing Nonce32." instance Serialize Nonce32 where get = Nonce32 <$> getBytes 32 -- cgit v1.2.3