haskell / haskell/primitive

Support levity polymorphic interface

Open
#356 10 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
123
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Since GHC 9.4, various primitives (`Array#`, `SmallArray#`, `MutVar#`, ...) and their corresponding primops are now levity polymorphic. I propose making the `primitive` wrappers (`Array`, `SmallArray`, `MutVar`, ...) also levity polymorphic, so that users can take advantage of the levity polymorphism without having to use the primops from `GHC.Exts` directly.

This would also supersede [primitive-unlifted](https://hackage.haskell.org/package/primitive-unlifted) afaict.

I'm not sure if this would be a breaking change, but it should at least be minor, since type variables default to kind `Type` (so `Array a` would still be `Array (a :: Type)`).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.