case-insensitive 1.2.0.6 → 1.2.0.7
raw patch · 4 files changed
+34/−1 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +5/−0
- README.markdown +3/−0
- bench/NoClass.hs +24/−0
- case-insensitive.cabal +2/−1
CHANGELOG view
@@ -1,3 +1,8 @@+1.2.0.7++* Fix build of benchmarks when getting the sources from Hackage.++ 1.2.0.6 * Add Travis CI support
README.markdown view
@@ -1,3 +1,6 @@+[](https://hackage.haskell.org/package/case-insensitive)+[](https://travis-ci.org/basvandijk/case-insensitive)+ The module `Data.CaseInsensitive` provides the `CI` type constructor which can be parameterised by a string-like type like: `String`, `ByteString`, `Text`, etc.. Comparisons of values of the resulting
+ bench/NoClass.hs view
@@ -0,0 +1,24 @@+module NoClass ( CI, mk ) where++import Control.DeepSeq ( NFData, rnf, deepseq )+import Data.ByteString ( ByteString )+import qualified Data.ByteString as B ( map )+import Data.Word ( Word8 )++data CI s = CI !s !s++instance NFData s => NFData (CI s) where+ rnf (CI o f) = o `deepseq` f `deepseq` ()++mk :: ByteString -> CI ByteString+mk s = CI s (foldCase s)++foldCase :: ByteString -> ByteString+foldCase = B.map toLower8++toLower8 :: Word8 -> Word8+toLower8 w+ | 65 <= w && w <= 90 ||+ 192 <= w && w <= 214 ||+ 216 <= w && w <= 222 = w + 32+ | otherwise = w
case-insensitive.cabal view
@@ -1,5 +1,5 @@ name: case-insensitive-version: 1.2.0.6+version: 1.2.0.7 cabal-version: >=1.8 build-type: Simple license: BSD3@@ -61,6 +61,7 @@ benchmark bench-case-insensitive type: exitcode-stdio-1.0 main-is: bench.hs+ other-modules: NoClass hs-source-dirs: bench ghc-options: -Wall -O2