Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runSmallUnliftedArrayST is still missing #5

Open
Qqwy opened this issue Oct 5, 2024 · 0 comments · May be fixed by #6
Open

runSmallUnliftedArrayST is still missing #5

Qqwy opened this issue Oct 5, 2024 · 0 comments · May be fixed by #6

Comments

@Qqwy
Copy link

Qqwy commented Oct 5, 2024

SmallUnliftedArray exists nowadays in primitive-unlifted.
It would be nice to add an implementation for it.

e.g., probably:

runSmallUnliftedArrayST :: (forall s. ST s (SmallUnliftedArray_ unlifted_a a)) -> SmallUnliftedArray_ unlifted_a a
{-# INLINE runSmallUnliftedArrayST #-}
runSmallUnliftedArrayST f = SmallUnliftedArray (Exts.runRW# (\s0 -> case f of ST g -> case g s0 of (# _, SmallUnliftedArray r #) -> r))

(though note haskell-primitive/primitive-unlifted#43 )

Qqwy added a commit to Qqwy/haskell-run-st that referenced this issue Oct 5, 2024
@Qqwy Qqwy linked a pull request Oct 5, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant