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

Mutable Indexing #221

Open
BebeSparkelSparkel opened this issue Jun 30, 2024 · 0 comments · May be fixed by #222
Open

Mutable Indexing #221

BebeSparkelSparkel opened this issue Jun 30, 2024 · 0 comments · May be fixed by #222
Assignees

Comments

@BebeSparkelSparkel
Copy link
Collaborator

BebeSparkelSparkel commented Jun 30, 2024

mutable-containers currently seems to only support deques and queues. Adding

class MutableCollection c => MutableInitialSizedCollection c where
  type CollIndex c :: Type
  newCollOfSize :: (PrimMonad m, PrimState m ~ MCState c) => CollIndex c -> m c
  
class MutableInitialSizedCollection c => MutableIndexing c where
  readIndex :: (PrimMonad m, PrimState m ~ MCState c) => c -> CollIndex c -> m (CollElement c)
  writeIndex :: (PrimMonad m, PrimState m ~ MCState c) => c -> CollIndex c -> CollElement c -> m ()

would allow mutable indexing.

@BebeSparkelSparkel BebeSparkelSparkel self-assigned this Jun 30, 2024
@BebeSparkelSparkel BebeSparkelSparkel linked a pull request Jun 30, 2024 that will close this issue
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