Skip to content

Mutable Indexing #221

@BebeSparkelSparkel

Description

@BebeSparkelSparkel

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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions