packages feed

case-insensitive 1.2.0.0 → 1.2.0.1

raw patch · 3 files changed

+10/−11 lines, 3 filesdep ~criteriondep ~text

Dependency ranges changed: criterion, text

Files

Data/CaseInsensitive/Internal.hs view
@@ -40,7 +40,7 @@ import Data.Data     ( Data ) import Data.Typeable ( Typeable ) import Data.Word     ( Word8 )-import Prelude       ( String, (.), fmap, (&&), (+), (<=), (>=), otherwise )+import Prelude       ( (.), fmap, (&&), (+), (<=), otherwise ) import Text.Read     ( Read, readPrec ) import Text.Show     ( Show, showsPrec ) @@ -165,6 +165,7 @@ instance FoldCase TL.Text where foldCase = TL.toCaseFold instance FoldCase (CI s)  where foldCase (CI _ l) = CI l l +{-# INLINE toLower8 #-} toLower8 :: Word8 -> Word8 toLower8 w   |  65 <= w && w <=  90 ||@@ -176,7 +177,7 @@ -- Rewrite RULES -------------------------------------------------------------------------------- -{-# RULES "mk/ByteString" forall (bs :: B.ByteString). mk bs = CI bs (foldCaseBS bs) #-}+{-# RULES "foldCase/ByteString" foldCase = foldCaseBS #-}  foldCaseBS :: B.ByteString -> B.ByteString foldCaseBS bs = B.map toLower8' bs
bench/bench.hs view
@@ -3,7 +3,7 @@  module Main ( main) where -import           Criterion.Main             ( defaultMain, bcompare, bench, nf )+import           Criterion.Main             ( defaultMain, bench, nf ) import qualified Data.ByteString      as B  ( readFile ) import qualified Data.CaseInsensitive as CI ( mk ) import qualified NoClass              as NC ( mk )@@ -17,8 +17,6 @@ main = do   bs <- B.readFile "data/pg2189.txt"   defaultMain-    [ bcompare-      [ bench "no-class"         $ nf (\s -> NC.mk s) bs-      , bench "case-insensitive" $ nf (\s -> CI.mk s) bs-      ]+    [ bench "no-class"         $ nf (\s -> NC.mk s) bs+    , bench "case-insensitive" $ nf (\s -> CI.mk s) bs     ]
case-insensitive.cabal view
@@ -1,5 +1,5 @@ name:          case-insensitive-version:       1.2.0.0+version:       1.2.0.1 cabal-version: >=1.8 build-type:    Simple license:       BSD3@@ -27,7 +27,7 @@   ghc-options: -Wall   build-depends: base       >= 3   && < 4.8                , bytestring >= 0.9 && < 0.11-               , text       >= 0.3 && < 1.2+               , text       >= 0.3 && < 1.3                , deepseq    >= 1.1 && < 1.4                , hashable   >= 1.0 && < 1.3   exposed-modules: Data.CaseInsensitive, Data.CaseInsensitive.Unsafe@@ -41,7 +41,7 @@   build-depends: case-insensitive                , base                 >= 3     && < 4.8                , bytestring           >= 0.9   && < 0.11-               , text                 >= 0.3   && < 1.2+               , text                 >= 0.3   && < 1.3                , HUnit                >= 1.2.2 && < 1.3                , test-framework       >= 0.2.4 && < 0.9                , test-framework-hunit >= 0.2.4 && < 0.4@@ -58,5 +58,5 @@   build-depends: case-insensitive                , base                 >= 3     && < 4.8                , bytestring           >= 0.9   && < 0.11-               , criterion            >= 0.6.1 && < 0.9+               , criterion            >= 0.6.1 && < 1.1                , deepseq              >= 1.1   && < 1.4