haskell / haskell/primitive

Wrong type for with(Mutable)PrimArrayContents

Open
#404 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
123
Forks
60
PR merge metrics
No merged PRs in 30d

Description

The `withMutablePrimArrayContents` and `withPrimArrayContents` functions take a `Ptr a -> m a`, which restricts you to only returning an `a`. Best guess as to why this might have been done is to prevent the return of the pointer itself, but... it prevents the return of everything else too ... Why not change them to `(Ptr a -> m b) -> m b`?

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.