base32 0.2.2.0 → 0.3
raw patch · 19 files changed
+80/−76 lines, 19 filesdep ~basedep ~bytestringdep ~deepseqsetup-changedPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, bytestring, deepseq, text
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- README.md +1/−1
- Setup.hs +0/−2
- base32.cabal +13/−13
- src/Data/ByteString/Base32.hs +1/−1
- src/Data/ByteString/Base32/Hex.hs +1/−1
- src/Data/ByteString/Lazy/Base32.hs +1/−1
- src/Data/ByteString/Lazy/Base32/Hex.hs +1/−1
- src/Data/ByteString/Short/Base32.hs +1/−1
- src/Data/ByteString/Short/Base32/Hex.hs +1/−1
- src/Data/Text/Encoding/Base32.hs +1/−1
- src/Data/Text/Encoding/Base32/Error.hs +1/−1
- src/Data/Text/Encoding/Base32/Hex.hs +7/−7
- src/Data/Text/Lazy/Encoding/Base32.hs +8/−8
- src/Data/Text/Lazy/Encoding/Base32/Hex.hs +8/−8
- src/Data/Text/Short/Encoding/Base32.hs +4/−4
- src/Data/Text/Short/Encoding/Base32/Hex.hs +4/−4
- test/Internal.hs +5/−5
- test/Main.hs +16/−16
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for base32 +## 0.3++* Bump lower bounds for `bytestring` and `text` to latest significant major/major version+* Update CI for 8.10.x thru 9.6 coverage+* Correct the update the latin1 decode default for text modules to `utf8` (which is now pure for `text-2.0`).+ ## 0.2.2.0 * Add support for GHC 9.2.x
README.md view
@@ -1,6 +1,6 @@ # Base32 -[](https://travis-ci.com/emilypi/base32)+ [](https://hackage.haskell.org/package/base32) Padded and unpadded base32 and base32hex encoding and decoding for `Text` and `ByteString` values.
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
base32.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: base32-version: 0.2.2.0+version: 0.3 synopsis: Fast RFC 4648-compliant Base32 encoding description: RFC 4648-compliant Base32 encodings and decodings.@@ -12,7 +12,7 @@ license-file: LICENSE author: Emily Pillmore maintainer: emilypi@cohomolo.gy-copyright: (c) 2020-2022 Emily Pillmore+copyright: (c) 2020-2023 Emily Pillmore category: Data build-type: Simple extra-source-files:@@ -20,7 +20,7 @@ README.md tested-with:- GHC ==8.10.7 || ==9.0.2 || ==9.2.2+ GHC ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.5 || ==9.6.2 source-repository head type: git@@ -51,10 +51,10 @@ Data.ByteString.Base32.Internal.Utils build-depends:- base >=4.14 && <4.17- , bytestring >=0.10 && <0.12- , deepseq ^>=1.4- , text ^>=1.2+ base >=4.14 && <4.19+ , bytestring ^>=0.11+ , deepseq ^>=1.4.4.0+ , text ^>=2.0 , text-short ^>=0.1 hs-source-dirs: src@@ -68,16 +68,16 @@ other-modules: Internal main-is: Main.hs build-depends:- base >=4.14 && <4.17+ base >=4.14 && <4.19 , base32- , bytestring+ , bytestring ^>=0.11 , memory , QuickCheck , random-bytestring , tasty , tasty-hunit , tasty-quickcheck- , text+ , text >=2.0 , text-short benchmark bench@@ -86,11 +86,11 @@ hs-source-dirs: benchmarks main-is: Base32Bench.hs build-depends:- base >=4.14 && <4.17+ base >=4.14 && <4.19 , base32- , bytestring+ , bytestring ^>=0.11 , criterion , deepseq , memory , random-bytestring- , text+ , text >=2.0
src/Data/ByteString/Base32.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base32/Hex.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Lazy/Base32.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Lazy.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Lazy/Base32/Hex.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Lazy.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Short/Base32.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Short.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Short/Base32/Hex.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.ByteString.Short.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base32.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} -- | -- Module : Data.Text.Encoding.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base32/Error.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE Safe #-} -- | -- Module : Data.Text.Encoding.Base32.Error--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base32/Hex.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} -- | -- Module : Data.Text.Encoding.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -55,7 +55,7 @@ -- 4 for safe decoding as base32hex encodings are optionally padded. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'T.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'T.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32With` -- and pass in a custom decode function.@@ -74,7 +74,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32 :: Text -> Either Text Text-decodeBase32 = fmap T.decodeLatin1 . B32H.decodeBase32 . T.encodeUtf8+decodeBase32 = fmap T.decodeUtf8 . B32H.decodeBase32 . T.encodeUtf8 {-# INLINE decodeBase32 #-} -- | Attempt to decode a 'ByteString' value as Base32hex, converting from@@ -120,7 +120,7 @@ -- | Decode an unpadded Base32hex encoded 'Text' value. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'T.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'T.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32WUnpaddedWith` -- and pass in a custom decode function.@@ -136,7 +136,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32Unpadded :: Text -> Either Text Text-decodeBase32Unpadded = fmap T.decodeLatin1+decodeBase32Unpadded = fmap T.decodeUtf8 . B32H.decodeBase32Unpadded . T.encodeUtf8 {-# INLINE decodeBase32Unpadded #-}@@ -170,7 +170,7 @@ -- | Decode an padded Base32hex encoded 'Text' value -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'T.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'T.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32PaddedWith` -- and pass in a custom decode function.@@ -186,7 +186,7 @@ -- Left "Base32-encoded bytestring requires padding" -- decodeBase32Padded :: Text -> Either Text Text-decodeBase32Padded = fmap T.decodeLatin1+decodeBase32Padded = fmap T.decodeUtf8 . B32H.decodeBase32Padded . T.encodeUtf8 {-# INLINE decodeBase32Padded #-}
src/Data/Text/Lazy/Encoding/Base32.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} -- | -- Module : Data.Text.Lazy.Encoding.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -58,7 +58,7 @@ -- 4 for safe decoding as base32 encodings are optionally padded. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32With` -- and pass in a custom decode function.@@ -77,7 +77,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32 :: TL.Text -> Either T.Text TL.Text-decodeBase32 = fmap TL.decodeLatin1 . BL32.decodeBase32 . TL.encodeUtf8+decodeBase32 = fmap TL.decodeUtf8 . BL32.decodeBase32 . TL.encodeUtf8 {-# INLINE decodeBase32 #-} -- | Attempt to decode a lazy 'ByteString' value as Base32, converting from@@ -122,7 +122,7 @@ -- | Decode an unpadded Base32 encoded 'TL.Text' value. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32WUnpaddedWith` -- and pass in a custom decode function.@@ -138,7 +138,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32Unpadded :: TL.Text -> Either T.Text TL.Text-decodeBase32Unpadded = fmap TL.decodeLatin1+decodeBase32Unpadded = fmap TL.decodeUtf8 . BL32.decodeBase32Unpadded . TL.encodeUtf8 {-# INLINE decodeBase32Unpadded #-}@@ -170,7 +170,7 @@ -- | Decode an padded Base32 encoded 'TL.Text' value -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32PaddedWith` -- and pass in a custom decode function.@@ -186,7 +186,7 @@ -- Left "Base32-encoded bytestring requires padding" -- decodeBase32Padded :: TL.Text -> Either T.Text TL.Text-decodeBase32Padded = fmap TL.decodeLatin1+decodeBase32Padded = fmap TL.decodeUtf8 . BL32.decodeBase32Padded . TL.encodeUtf8 {-# INLINE decodeBase32Padded #-}@@ -230,7 +230,7 @@ -- -- "<<?>>" -- -- -- decodeBase32Lenient :: TL.Text -> TL.Text--- decodeBase32Lenient = TL.decodeLatin1+-- decodeBase32Lenient = TL.decodeUtf8 -- . BL32.decodeBase32Lenient -- . TL.encodeUtf8 -- {-# INLINE decodeBase32Lenient #-}
src/Data/Text/Lazy/Encoding/Base32/Hex.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} -- | -- Module : Data.Text.Lazy.Encoding.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -58,7 +58,7 @@ -- 4 for safe decoding as base32hex encodings are optionally padded. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32With` -- and pass in a custom decode function.@@ -77,7 +77,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32 :: TL.Text -> Either T.Text TL.Text-decodeBase32 = fmap TL.decodeLatin1 . BL32H.decodeBase32 . TL.encodeUtf8+decodeBase32 = fmap TL.decodeUtf8 . BL32H.decodeBase32 . TL.encodeUtf8 {-# INLINE decodeBase32 #-} -- | Attempt to decode a lazy 'ByteString' value as Base32hex, converting from@@ -122,7 +122,7 @@ -- | Decode an unpadded Base32hex encoded 'TL.Text' value. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32WUnpaddedWith` -- and pass in a custom decode function.@@ -138,7 +138,7 @@ -- Left "Base32-encoded bytestring has invalid padding" -- decodeBase32Unpadded :: TL.Text -> Either T.Text TL.Text-decodeBase32Unpadded = fmap TL.decodeLatin1+decodeBase32Unpadded = fmap TL.decodeUtf8 . BL32H.decodeBase32Unpadded . TL.encodeUtf8 {-# INLINE decodeBase32Unpadded #-}@@ -170,7 +170,7 @@ -- | Decode an padded Base32hex encoded 'TL.Text' value -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'TL.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'TL.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32PaddedWith` -- and pass in a custom decode function.@@ -186,7 +186,7 @@ -- Left "Base32-encoded bytestring requires padding" -- decodeBase32Padded :: TL.Text -> Either T.Text TL.Text-decodeBase32Padded = fmap TL.decodeLatin1+decodeBase32Padded = fmap TL.decodeUtf8 . BL32H.decodeBase32Padded . TL.encodeUtf8 {-# INLINE decodeBase32Padded #-}@@ -230,7 +230,7 @@ -- -- "<<?>>" -- -- -- decodeBase32Lenient :: TL.Text -> TL.Text--- decodeBase32Lenient = TL.decodeLatin1+-- decodeBase32Lenient = TL.decodeUtf8 -- . BL32H.decodeBase32Lenient -- . TL.encodeUtf8 -- {-# INLINE decodeBase32Lenient #-}
src/Data/Text/Short/Encoding/Base32.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.Text.Short.Encoding.Base32--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -61,7 +61,7 @@ -- 4 for safe decoding as base32 encodings are optionally padded. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'Data.Text.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'Data.Text.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32With` -- and pass in a custom decode function.@@ -127,7 +127,7 @@ -- | Decode an unpadded Base32 encoded 'ShortText' value. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'T.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'T.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32UnpaddedWith` -- and pass in a custom decode function.@@ -173,7 +173,7 @@ -- | Decode an padded Base32 encoded 'ShortText' value -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'T.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'T.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32PaddedWith` -- and pass in a custom decode function.
src/Data/Text/Short/Encoding/Base32/Hex.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -- | -- Module : Data.Text.Short.Encoding.Base32.Hex--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -61,7 +61,7 @@ -- 4 for safe decoding as base32hex encodings are optionally padded. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'Data.Text.Encoding.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'Data.Text.Encoding.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32With` -- and pass in a custom decode function.@@ -127,7 +127,7 @@ -- | Decode an unpadded Base32hex encoded 'ShortText' value. -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'Data.Text.Encoding.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'Data.Text.Encoding.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32UnpaddedWith` -- and pass in a custom decode function.@@ -173,7 +173,7 @@ -- | Decode an padded Base32hex encoded 'ShortText' value -- -- /Note:/ This function makes sure that decoding is total by deferring to--- 'Data.Text.Encoding.decodeLatin1'. This will always round trip for any valid Base32-encoded+-- 'Data.Text.Encoding.decodeUtf8'. This will always round trip for any valid Base32-encoded -- text value, but it may not round trip for bad inputs. The onus is on the -- caller to make sure inputs are valid. If unsure, defer to `decodeBase32PaddedWith` -- and pass in a custom decode function.
test/Internal.hs view
@@ -9,7 +9,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -- | -- Module : Main--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -262,12 +262,12 @@ coarbitrary = coarbitrary . SBS.unpack instance Arbitrary T.Text where- arbitrary = T.pack <$> arbitrary- shrink xs = T.pack <$> shrink (T.unpack xs)+ arbitrary = T.pack . getUnicodeString <$> arbitrary+ shrink xs = T.pack . getUnicodeString <$> shrink (UnicodeString $ T.unpack xs) instance Arbitrary TL.Text where- arbitrary = TL.pack <$> arbitrary- shrink xs = TL.pack <$> shrink (TL.unpack xs)+ arbitrary = TL.pack . getUnicodeString <$> arbitrary+ shrink xs = TL.pack . getUnicodeString <$> shrink (UnicodeString $ TL.unpack xs) instance CoArbitrary T.Text where coarbitrary = coarbitrary . T.unpack
test/Main.hs view
@@ -8,7 +8,7 @@ {-# LANGUAGE RecordWildCards #-} -- | -- Module : Main--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2023 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>@@ -170,35 +170,35 @@ prop_padding_invariants :: C a => Harness a -> TestTree prop_padding_invariants Harness{..} = testGroup "prop_padding_invariants" [ testProperty "prop_hex_nopad_roundtrip" $ \(bs :: b) ->- Right (encodeHexNopad bs)- == decodeHexNopad (encodeHexNopad (encodeHexNopad bs))+ Right bs+ == decodeHexNopad (encodeHexNopad bs) , testProperty "prop_hex_pad_roundtrip" $ \(bs :: b) ->- Right (encodeHex bs) == decodeHexPad (encodeHex (encodeHex bs))+ Right bs == decodeHexPad (encodeHex bs) , testProperty "prop_hex_decode_invariant" $ \(bs :: b) ->- ( decodeHexNopad (encodeHexNopad (encodeHex bs))- == decodeHex (encodeHex (encodeHex bs))+ ( decodeHexNopad (encodeHexNopad bs)+ == decodeHex (encodeHex bs) ) ||- ( decodeHexPad (encodeHex (encodeHex bs))- == decodeHex (encodeHex (encodeHex bs))+ ( decodeHexPad (encodeHex bs)+ == decodeHex (encodeHex bs) ) , testProperty "prop_std_decode_invariant" $ \(bs :: b) ->- ( decodeNopad (encodeNopad (encode bs))- == decode (encode (encode bs))+ ( decodeNopad (encodeNopad bs)+ == decode (encode bs) ) ||- ( decodePad (encode (encode bs))- == decode (encode (encode bs))+ ( decodePad (encode bs)+ == decode (encode bs) ) , testProperty "prop_hex_padding_coherence" $ \(bs :: b) ->- Right (encodeHex bs) == decodeHex (encodeHex (encodeHex bs))- && Right (encodeHex bs) == decodeHexPad (encodeHex (encodeHex bs))+ Right bs == decodeHex (encodeHex bs)+ && Right bs == decodeHexPad (encodeHex bs) , testProperty "prop_hex_nopadding_coherence" $ \(bs :: b) ->- Right (encodeHexNopad bs) == decodeHexNopad (encodeHexNopad (encodeHexNopad bs))- && Right (encodeHexNopad bs) == decodeHex (encodeHexNopad (encodeHexNopad bs))+ Right bs == decodeHexNopad (encodeHexNopad bs)+ && Right bs == decodeHex (encodeHexNopad bs) ] -- | just a sanity check against `memory`