Closed andreasabel closed 11 months ago
Thanks for reporting! Our bounds are very much loose, indeed. Will look into it.
Looks like you need primitive-0.6.4.0
at least, which adds the module Data.Primitive.PrimArray
.
I also see that a point release 0.1.1.2
was made to revise some bounds: https://github.com/klapaucius/vector-hashtables/blob/29abb49db7d71582d1f9b7ae2cf3fe87a89084ae/changelog.md?plain=1#L9-L12
Let me emphasize here that a point release is not a solution to bound errors, only revisions can fix such errors properly (and these should be applied to all affected releases, not just the most recent one).
Looks like you need
primitive-0.6.4.0
at least, which adds the moduleData.Primitive.PrimArray
.
I should be more precise: primitive-0.6.4.0
is the exact lower bound we need, otherwise the package will become incompatible with stackage lts-14.27, see https://www.stackage.org/lts-14.27/package/primitive-0.6.4.0.
Sorry, rowing back...
primitive-0.6.4.0
is still not sufficient, I get these errors then:
Building library for vector-hashtables-0.1.1.1...
[1 of 4] Compiling Data.Primitive.PrimArray.Utils ( src/Data/Primitive/PrimArray/Utils.hs, dist/build/Data/Primitive/PrimArray/Utils.o )
src/Data/Primitive/PrimArray/Utils.hs:24:12: error:
• Variable not in scope:
cloneMutablePrimArray
:: MutablePrimArray (PrimState m) a
-> Integer -> Int -> m (MutablePrimArray (PrimState m) a)
• Perhaps you meant one of these:
‘copyMutablePrimArray’ (imported from Data.Primitive),
‘sameMutablePrimArray’ (imported from Data.Primitive),
‘cloneMutableArray’ (imported from Data.Primitive)
|
24 | clone xs = cloneMutablePrimArray xs 0 (sizeofMutablePrimArray xs)
| ^^^^^^^^^^^^^^^^^^^^^
src/Data/Primitive/PrimArray/Utils.hs:59:14: error:
• Variable not in scope:
clonePrimArray :: PrimArray a -> Integer -> Int -> PrimArray a
• Perhaps you meant one of these:
‘copyPrimArray’ (imported from Data.Primitive),
‘newPrimArray’ (imported from Data.Primitive),
‘foldlPrimArray’ (imported from Data.Primitive)
|
59 | return $ clonePrimArray r 0 (sizeofPrimArray r)
| ^^^^^^^^^^^^^^
This works:
vector-hashtables-0.1.1.1$ cabal build -w ghc-8.6.5 --prefer-oldest -O0 -c 'primitive >= 0.7.1'
The changelog entry you referenced suggests that the precise bound is 0.7.1.0 because earlier versions don't have the clone*
functions that we use. I just checked that we can't build with 0.6.4.0 and that we can build with 0.7.1.0, and made revisions for all the older versions on Hackage that didn't have a lower bound on primitive
. Now, I checked that the 0.1.0.0 version builds with --prefere-oldest
on GHC 8.8.4 (this is the oldest one I have handy). Does this sound good to close the issue?
Thanks a lot for educating me on revisions! I have yet to master this skill...
Excellent, thank you, Artem!
Looks like the lower bounds of
vector-hashtables-0.1.0.0
are not set correctly, please make suitable Hackage revisions! (I have not tested if other versions ofvector-hashtables
are affected.)