packages feed

charset 0.3.8 → 0.3.9

raw patch · 4 files changed

+33/−5 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.3.9 [2021.11.01]+------------------+* Allow building with GHC 9.2.+ 0.3.8 [2021.02.17] ------------------ * Add an `IsString CharSet` instance.
charset.cabal view
@@ -1,5 +1,5 @@ name:          charset-version:       0.3.8+version:       0.3.9 license:       BSD3 license-File:  LICENSE copyright:     (c) Edward Kmett 2010-2012@@ -26,8 +26,10 @@    || ==8.2.2    || ==8.4.4    || ==8.6.5-   || ==8.8.3-   || ==8.10.1+   || ==8.8.4+   || ==8.10.7+   || ==9.0.1+   || ==9.2.1  source-repository head   type: git
src/Data/CharSet.hs view
@@ -371,4 +371,6 @@  instance Monoid CharSet where   mempty = empty+#if !(MIN_VERSION_base(4,11,0))   mappend = union+#endif
src/Data/CharSet/ByteSet.hs view
@@ -32,7 +32,13 @@  import Data.Bits ((.&.), (.|.)) import Foreign.Storable (peekByteOff, pokeByteOff)-import GHC.Base (Int(I#), iShiftRA#, narrow8Word#, shiftL#)+import GHC.Exts ( Int(I#), Word#, iShiftRA#, shiftL#+#if MIN_VERSION_base(4,16,0)+                , Word8#, word8ToWord#, wordToWord8#+#else+                , narrow8Word#+#endif+                ) import GHC.Word (Word8(W8#)) import qualified Data.ByteString as B import qualified Data.ByteString.Internal as I@@ -50,7 +56,7 @@ shiftR (I# x#) (I# i#) = I# (x# `iShiftRA#` i#)  shiftL :: Word8 -> Int -> Word8-shiftL (W8# x#) (I# i#) = W8# (narrow8Word# (x# `shiftL#` i#))+shiftL (W8# x#) (I# i#) = W8# (narrow8WordCompat# (word8ToWordCompat# x# `shiftL#` i#))  -- | Convert a bit index to a byte index and bit index inside the byte index :: Int -> I@@ -73,3 +79,17 @@ member w (ByteSet t) = U.unsafeIndex t byte .&. bit /= 0   where     I byte bit = index (fromIntegral w)++#if MIN_VERSION_base(4,16,0)+word8ToWordCompat# :: Word8# -> Word#+word8ToWordCompat# = word8ToWord#++narrow8WordCompat# :: Word# -> Word8#+narrow8WordCompat# = wordToWord8#+#else+word8ToWordCompat# :: Word# -> Word#+word8ToWordCompat# x = x++narrow8WordCompat# :: Word# -> Word#+narrow8WordCompat# = narrow8Word#+#endif