Skip to content

Documentation issues in Data.Vector.Mutable #213

@treeowl

Description

@treeowl

MVector is exported concretely, but its three fields are undocumented. In particular, it's not obvious to users whether the second Int is an offset or a length.

slice doesn't document what its Int arguments mean. Data.Vector.Generic.basicUnsafeSlice lacks that documentation as well. The explanation should be copied from Data.Vector in each case.

init, tail, take, drop, and splitAt have no documentation whatsoever, and in particular fail to note that they don't copy the underlying vector. The "unsafe" versions are also completely undocumented.

unsafeNew claims that the vector isn't initialized, but it actually is. Only unboxed vectors can be created uninitialized. The only difference between unsafeNew and new is that new checks that the requested size is sensible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions