travitch / persistent-vector

Persistent vectors for Haskell based on array mapped tries
BSD 3-Clause "New" or "Revised" License
27 stars 4 forks source link

Remove local Array implementation #16

Open travitch opened 4 years ago

travitch commented 4 years ago

Data.Vector.Persistent.Array was taken from unordered-containers. I don't recall why - perhaps primitive was not mature enough at the time. It seems like it should be possible to just use Array (or SmallArray as in #15) from primitive and delete the local copy.

treeowl commented 4 years ago

I know that @tibbe had trouble getting enough things sufficiently specialized and inlined with primitive, which is why he stuck with a local version in unordered-containers. It may well be that GHC has improved in that regard, but if we make that change, we'll need to audit the Core rather carefully. I strongly suspect the current primitive maintainers (of which I am one) would be open to exporting ST-only modules that avoid any risk in that department. See the master branch of primitive-unlifted to see what that would look like.