Primitive GHC types with unlifted types inside. There used to be a module named Data.Primitive.UnliftedArray in the primitive library. However, it turns out that it is impossible to write such an API safely in versions of GHC before 8.10.1, thanks to some nasty interactions between unsafe coercions and the foreign function interface. This package also uses a somewhat different, and more flexible, approach than that module did.



All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to the Haskell Package Versioning Policy. – 2023-06-28

  • Change the order of the type arguments to UnliftedArray_ and MutableUnliftedArray_. This makes the library work better with the typeclasses in the contiguous library. – 2023-06-27

  • Use legitimate unlifted primitive types and operations, only supporting GHC 9.4 and newer. – 2020-11-02

  • Redo everything. This uses unsafeCoerce# a lot to coerce between lifted and unlifted types. Stay on the 0.1.x.x series unless you need something from this newer version. – 2020-01-23

  • Add PrimUnlifted instances for ShortText and ShortByteString.
  • Add singletonUnliftedArray. – 2019-07-08

  • Add PrimUnlifted instances for MVar, IORef, and STRef. – 2019-05-23

  • Cannot remember what happened in this release. – 2019-05-17

  • First version. Released on an unsuspecting world.