unicode-transforms 0.3.7 → 0.3.7.1
raw patch · 3 files changed
+21/−9 lines, 3 filesdep ~bytestringdep ~ghc-primnew-uploader
Dependency ranges changed: bytestring, ghc-prim
Files
- Changelog.md +4/−0
- Data/Unicode/Internal/Bits.hs +12/−4
- unicode-transforms.cabal +5/−5
Changelog.md view
@@ -1,3 +1,7 @@+## 0.3.7.1++* Fix x32 build+ ## 0.3.7 * Significant performance improvements
Data/Unicode/Internal/Bits.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} -- | -- Module : Data.Unicode.Internal.Bits@@ -16,8 +17,9 @@ lookupBit64 ) where +import Data.Bits (finiteBitSize, popCount) import GHC.Exts- (Addr#, Int(..), Word(..), indexWord64OffAddr#, and#, andI#,+ (Addr#, Int(..), Word(..), indexWordOffAddr#, and#, andI#, uncheckedIShiftRL#, uncheckedShiftL#) -- | @lookup64 addr index@ looks up the bit stored at bit index @index@ using a@@ -29,7 +31,13 @@ lookupBit64 :: Addr# -> Int -> Bool lookupBit64 addr# (I# index#) = W# (word## `and#` bitMask##) /= 0 where- wordIndex# = index# `uncheckedIShiftRL#` 6#- word## = indexWord64OffAddr# addr# wordIndex#- bitIndex# = index# `andI#` 63#+ !fbs@(I# fbs#) = finiteBitSize (0 :: Word) - 1+ !(I# logFbs#) = case fbs of+ 31 -> 5+ 63 -> 6+ _ -> popCount fbs -- this is a really weird architecture++ wordIndex# = index# `uncheckedIShiftRL#` logFbs#+ word## = indexWordOffAddr# addr# wordIndex#+ bitIndex# = index# `andI#` fbs# bitMask## = 1## `uncheckedShiftL#` bitIndex#
unicode-transforms.cabal view
@@ -1,13 +1,13 @@ cabal-version: 2.2 name: unicode-transforms-version: 0.3.7+version: 0.3.7.1 synopsis: Unicode normalization description: Fast Unicode 13.0.0 normalization in Haskell (NFC, NFKC, NFD, NFKD). category: Data,Text,Unicode stability: Experimental-homepage: http://github.com/harendra-kumar/unicode-transforms-bug-reports: https://github.com/harendra-kumar/unicode-transforms/issues+homepage: http://github.com/composewell/unicode-transforms+bug-reports: https://github.com/composewell/unicode-transforms/issues author: Harendra Kumar maintainer: harendra.kumar@gmail.com copyright: 2016-2017 Harendra Kumar,@@ -51,7 +51,7 @@ source-repository head type: git- location: https://github.com/harendra-kumar/unicode-transforms+ location: https://github.com/composewell/unicode-transforms flag dev description: Developer build@@ -96,7 +96,7 @@ ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs build-depends: base >=4.7 && <5- , bytestring >=0.9 && <0.11+ , bytestring >=0.9 && <0.12 , text >=1.1.1 && <1.3 , ghc-prim >= 0.2 && < 0.7 if flag(dev)