fast-bech32 1.0.0 → 1.0.1
raw patch · 4 files changed
+29/−13 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- CHANGELOG.md +15/−1
- fast-bech32.cabal +9/−8
- src/Data/ByteString/Bech32.hs +2/−3
- test/unit/Data/ByteString/Bech32Spec.hs +3/−1
CHANGELOG.md view
@@ -1,5 +1,19 @@ # Changelog +## [1.0.1] -- 2023-12-04++### Added++- N/A++### Changed++- Support for GHC>=9.6++### Removed++- N/A+ ## [1.0.0] -- 2021-03-18 ### Added@@ -7,7 +21,7 @@ - Initial release, only covering the bech32 encoding - Provide benchmarks for comparing with the existing bech32 library as well as an optimized base32 library. -### Changed +### Changed N/A
fast-bech32.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack------ hash: c90aa64d9b573bd74e26c606bccc9065e63e43f351c94f930b404bfa961fc685 name: fast-bech32-version: 1.0.0+version: 1.0.1 synopsis: Fast implementation of the Bech32 encoding format. description: Please see the README on GitHub at <https://github.com/cardanosolutions/ogmios/tree/master/server/modules/fast-bech32> category: Codec@@ -67,18 +65,19 @@ ScopedTypeVariables StandaloneDeriving TupleSections+ TypeApplications TypeFamilies TypeSynonymInstances ViewPatterns ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -Wunused-packages build-depends:- base >=4.7 && <5+ base >=4.17 && <5 , bytestring , relude , text+ default-language: Haskell2010 if true ghc-options: -O2- default-language: Haskell2010 test-suite unit type: exitcode-stdio-1.0@@ -120,6 +119,7 @@ ScopedTypeVariables StandaloneDeriving TupleSections+ TypeApplications TypeFamilies TypeSynonymInstances ViewPatterns@@ -128,7 +128,7 @@ hspec-discover:hspec-discover build-depends: QuickCheck- , base >=4.7 && <5+ , base >=4.17 && <5 , base16 , bech32 , bytestring@@ -176,12 +176,13 @@ ScopedTypeVariables StandaloneDeriving TupleSections+ TypeApplications TypeFamilies TypeSynonymInstances ViewPatterns ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -Wunused-packages -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4.7 && <5+ base >=4.17 && <5 , bech32 , bytestring , criterion
src/Data/ByteString/Bech32.hs view
@@ -4,7 +4,6 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-}-{-# LANGUAGE TypeApplications #-} {-# LANGUAGE ViewPatterns #-} -- | This package provides an implementation of the bech32 encoding. In essence,@@ -56,7 +55,7 @@ import Foreign.Storable ( peek, poke ) import GHC.Exts- ( Addr#, indexWord8OffAddr#, word2Int# )+ ( Addr#, indexWord8OffAddr#, word2Int#, word8ToWord#) import GHC.ForeignPtr ( mallocPlainForeignPtrBytes ) import GHC.Word@@ -269,5 +268,5 @@ -- | Fast array lookup of a word5 in an unboxed bytestring. lookupWord5 :: Addr# -> Word5 -> Word8 lookupWord5 table (coerce -> (W8# i)) =- W8# (indexWord8OffAddr# table (word2Int# i))+ W8# (indexWord8OffAddr# table (word2Int# (word8ToWord# i))) {-# INLINE lookupWord5 #-}
test/unit/Data/ByteString/Bech32Spec.hs view
@@ -8,6 +8,8 @@ import Prelude +import Data.Base16.Types+ ( extractBase16 ) import Data.ByteString ( ByteString ) import Data.ByteString.Base16@@ -48,7 +50,7 @@ newtype Bytes = Bytes { unBytes :: ByteString } instance Show Bytes where- show = T.unpack . encodeBase16 . unBytes+ show = T.unpack . extractBase16 . encodeBase16 . unBytes genBytes :: Gen Bytes genBytes =