chimera 0.4.1.0 → 0.4.2.0
raw patch · 5 files changed
+35/−17 lines, 5 filesdep ~QuickCheckdep ~tasty-benchPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, tasty-bench
API changes (from Hackage documentation)
Files
- bench/Memoize.hs +1/−0
- changelog.md +4/−0
- chimera.cabal +10/−8
- src/Data/Chimera/Compat.hs +13/−2
- src/Data/Chimera/Internal.hs +7/−7
bench/Memoize.hs view
@@ -5,6 +5,7 @@ ( memoizeBenchmark ) where +import Prelude hiding (Foldable(..)) import Data.Bits import Data.Chimera import Data.Foldable
changelog.md view
@@ -1,3 +1,7 @@+# 0.4.2.0++* Adjust implementation to reflect better implementation of ARM primops in GHC 9.12+.+ # 0.4.1.0 * Fix divergence of `fromInfinite` and `fromListWithDef` on infinite inputs.
chimera.cabal view
@@ -1,14 +1,16 @@ cabal-version: 2.2 name: chimera-version: 0.4.1.0+version: 0.4.2.0 license: BSD-3-Clause license-file: LICENSE copyright: 2017-2019 Bodigrim maintainer: andrew.lelechenko@gmail.com author: Bodigrim tested-with:- ghc ==9.8.1 ghc ==9.6.3 ghc ==9.4.8 ghc ==9.2.8 ghc ==9.0.2- ghc ==8.10.7 ghc ==8.8.4 ghc ==8.6.5 ghc ==8.4.4 ghc ==8.2.2+ ghc ==9.14.1+ ghc ==9.12.2 ghc ==9.10.3 ghc ==9.8.4 ghc ==9.6.6 ghc ==9.4.8+ ghc ==9.2.8 ghc ==9.0.2 ghc ==8.10.7 ghc ==8.8.4 ghc ==8.6.5+ ghc ==8.4.4 ghc ==8.2.2 homepage: https://github.com/Bodigrim/chimera#readme synopsis:@@ -76,7 +78,7 @@ transformers <0.7, vector <0.14, - if arch(aarch64)+ if (arch(aarch64) && impl(ghc <9.12)) c-sources: cbits/aarch64.c include-dirs: cbits @@ -96,10 +98,10 @@ base >=4.5 && <5, chimera, infinite-list,- QuickCheck >=2.10 && <2.15,+ QuickCheck >=2.10 && <2.19, tasty <1.6, tasty-hunit <0.11,- tasty-quickcheck <0.11,+ tasty-quickcheck <0.12, tasty-smallcheck <0.9, vector, @@ -117,7 +119,7 @@ base, chimera, mtl,- random <1.3,+ random <1.4, tasty >=1.4.2,- tasty-bench >=0.3.2 && <0.4,+ tasty-bench >=0.4 && <0.6, vector,
src/Data/Chimera/Compat.hs view
@@ -18,9 +18,14 @@ remWord2#, ) where -#ifdef aarch64_HOST_ARCH-import GHC.Exts (Word(..), Word#, timesWord#)+#if defined(aarch64_HOST_ARCH) && __GLASGOW_HASKELL__ < 912 +import GHC.Exts (Word(..), Word#)++#if __GLASGOW_HASKELL__ < 904++import GHC.Exts (timesWord#)+ timesWord2# :: Word# -> Word# -> (# Word#, Word# #) timesWord2# x y = (# z, timesWord# x y #) where@@ -28,6 +33,12 @@ {-# INLINE timesWord2# #-} foreign import capi unsafe "aarch64.h umulh" c_umulh :: Word -> Word -> Word++#else++import GHC.Exts (timesWord2#)++#endif remWord2# :: Word# -> Word# -> Word# -> Word# remWord2# lo hi m = r
src/Data/Chimera/Internal.hs view
@@ -121,9 +121,9 @@ -- @since 0.2.0.0 instance Applicative (Chimera V.Vector) where pure a =- Chimera $- A.arrayFromListN (bits + 1) $- G.singleton a : map (\k -> G.replicate (1 `shiftL` k) a) [0 .. bits - 1]+ Chimera+ $ A.arrayFromListN (bits + 1)+ $ G.singleton a : map (\k -> G.replicate (1 `shiftL` k) a) [0 .. bits - 1] (<*>) = zipWithSubvectors (<*>) liftA2 f = zipWithSubvectors (liftA2 f) @@ -624,10 +624,10 @@ -> Chimera v a prependVector (G.uncons -> Nothing) ch = ch prependVector (G.uncons -> Just (pref0, pref)) (Chimera as) =- Chimera $- fromListN (bits + 1) $- fmap sliceAndConcat $- [LazySlice 0 1 $ G.singleton pref0] : go 0 1 0 inputs+ Chimera+ $ fromListN (bits + 1)+ $ fmap sliceAndConcat+ $ [LazySlice 0 1 $ G.singleton pref0] : go 0 1 0 inputs where inputs :: [(Word, v a)] inputs =