haskell / haskell/primitive

Consider making distinct types for pinned and unpinned arrays

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

Description

There are operations that can't support unpinned arrays, but currently the types don't actually prevent such arrays from being provided. There are constructive operations that should be able to produce either pinned or unpinned arrays, but currently only exist for unpinned arrays, such as primArrayFromList (there's no pinnedPrimArrayFromList).

One potential option would be to make a type parameter that is a data kind, indicating Pinned or Unpinned. Then operations that apply to both can just leave that type parameter unspecified...

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.