charset 0.3.10 → 0.3.11
raw patch · 7 files changed
+21/−42 lines, 7 filesdep −semigroupsdep ~basePVP ok
version bump matches the API change (PVP)
Dependencies removed: semigroups
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +4/−0
- charset.cabal +10/−15
- src/Data/CharSet.hs +1/−11
- src/Data/CharSet/ByteSet.hs +2/−12
- src/Data/CharSet/Unicode.hs +1/−1
- src/Data/CharSet/Unicode/Block.hs +2/−2
- src/Data/CharSet/Unicode/Category.hs +1/−1
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.3.11 [2024.12.04]+-------------------+* Drop support for pre-8.0 versions of GHC.+ 0.3.10 [2023.08.06] ------------------- * Allow building with `bytestring-0.12.*`.
charset.cabal view
@@ -1,5 +1,5 @@ name: charset-version: 0.3.10+version: 0.3.11 license: BSD3 license-File: LICENSE copyright: (c) Edward Kmett 2010-2012@@ -16,22 +16,19 @@ extra-source-files: CHANGELOG.markdown, README.markdown tested-with:- GHC ==7.0.4- || ==7.2.2- || ==7.4.2- || ==7.6.3- || ==7.8.4- || ==7.10.3- || ==8.0.2+ GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2- || ==9.2.7- || ==9.4.5- || ==9.6.2+ || ==9.2.8+ || ==9.4.8+ || ==9.6.6+ || ==9.8.4+ || ==9.10.1+ || ==9.12.1 source-repository head type: git@@ -42,13 +39,11 @@ other-extensions: MagicHash, BangPatterns build-depends:- base >= 4 && < 5,+ base >= 4.9 && < 5, array >= 0.2 && < 0.6, bytestring >= 0.9 && < 0.13,- containers >= 0.2 && < 0.7,+ containers >= 0.2 && < 0.8, unordered-containers >= 0.1.4.6 && < 0.3- if impl(ghc < 8.0)- build-depends: semigroups >= 0.8.3.1 && < 1 exposed-modules: Data.CharSet
src/Data/CharSet.hs view
@@ -1,9 +1,6 @@ {-# OPTIONS_GHC -fspec-constr #-} {-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveDataTypeable #-}-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-}-#endif ----------------------------------------------------------------------------- -- | -- Module : Data.CharSet@@ -75,11 +72,6 @@ , toArray ) where -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 608-import Data.String (IsString(..))--- <<< -XOverloadedStrings >>> was introduced by GHC 6.8.1-#endif- import Data.Array.Unboxed hiding (range) import Data.Data import Data.Function (on)@@ -90,6 +82,7 @@ import Data.Word import Data.ByteString.Internal (c2w) import Data.Semigroup+import Data.String (IsString(..)) import qualified Data.IntSet as I import qualified Data.List as L import Prelude hiding (filter, map, null)@@ -104,13 +97,10 @@ !Bool -- Whether ByteSet and IntSet are negated !ByteSet -- Set of head bytes, unboxed !IntSet -- Set of characters in the charset- deriving Typeable -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 608 -- | @= CharSet.`fromList`@ instance IsString CharSet where fromString = fromList-#endif charSet :: Bool -> IntSet -> CharSet charSet b s = CharSet b (ByteSet.fromList (fmap headByte (I.toAscList s))) s
src/Data/CharSet/ByteSet.hs view
@@ -1,8 +1,6 @@ {-# LANGUAGE BangPatterns, MagicHash #-} {-# LANGUAGE CPP #-}-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-}-#endif ----------------------------------------------------------------------------- -- | -- Module : Data.CharSet.ByteSet@@ -32,6 +30,7 @@ import Data.Bits ((.&.), (.|.)) import Foreign.Storable (peekByteOff, pokeByteOff)+import Foreign.Marshal.Utils (fillBytes) import GHC.Exts ( Int(I#), Word#, iShiftRA#, shiftL# #if MIN_VERSION_base(4,16,0) , Word8#, word8ToWord#, wordToWord8#@@ -44,10 +43,6 @@ import qualified Data.ByteString.Internal as I import qualified Data.ByteString.Unsafe as U -#if MIN_VERSION_base(4,8,0)-import Foreign.Marshal.Utils (fillBytes)-#endif- newtype ByteSet = ByteSet B.ByteString deriving (Eq, Ord, Show) -- | Representation of the index of a bit inside a bytestring@@ -69,12 +64,7 @@ fromList :: [Word8] -> ByteSet fromList s0 = ByteSet $ I.unsafeCreate 32 $ \t -> do- _ <--#if MIN_VERSION_base(4,8,0)- fillBytes t 0 32-#else- I.memset t 0 32-#endif+ _ <- fillBytes t 0 32 let go [] = return () go (c:cs) = do prev <- peekByteOff t byte :: IO Word8
src/Data/CharSet/Unicode.hs view
@@ -44,7 +44,7 @@ import Data.CharSet data UnicodeCategory = UnicodeCategory String String CharSet String- deriving (Show, Data, Typeable)+ deriving (Show, Data) -- \p{Letter} or \p{Mc} unicodeCategories :: [UnicodeCategory]
src/Data/CharSet/Unicode/Block.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}+{-# OPTIONS_GHC -Wno-missing-signatures #-} ----------------------------------------------------------------------------- -- | -- Module : Data.CharSet.Unicode.Block@@ -139,7 +139,7 @@ data Block = Block { blockName :: String , blockCharSet :: CharSet- } deriving (Show, Data, Typeable)+ } deriving (Show, Data) blocks :: [Block] blocks =
src/Data/CharSet/Unicode/Category.hs view
@@ -55,7 +55,7 @@ , categoryAbbreviation :: String , categoryCharSet :: CharSet , categoryDescription :: String- } deriving (Show, Data, Typeable)+ } deriving (Show, Data) -- \p{Letter} or \p{Mc} categories :: [Category]