Skip to content

Documentation issues in Data.Vector.Mutable #213

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.

Activity

  1. sjakobi commented on Dec 1, 2019

    @sjakobi
    Member

    Thanks for the hint regarding slice! I had hoped that I could find info on this on the issue tracker! :)

  2. cartazio commented on Dec 1, 2019

    @cartazio
    Contributor
  3. added 2 commits that reference this issue on Feb 2, 2020
    9b65b8e
    7a15adc
  4. added 2 commits that reference this issue on Apr 11, 2020
    98e0dde
    64c2e8e
  5. added 2 commits that reference this issue on Jun 7, 2020
    669df76
    0915cac
  6. added 2 commits that reference this issue on Jan 16, 2021
    2196022
    575b1ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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