fromListN documentation: clarify (or remove?) "It's expected that the supplied list will be exactly n elements long"
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- haskell
- Domain
- documentation
Research direction
Start with the Haddock comment for Data.Vector.fromListN at the linked documentation entry, then check the stated behavior for lists longer and shorter than n. Update the wording so “expected” is unambiguous, or remove it if it adds no useful constraint; done means the documentation accurately describes both cases.
Written by the indexing model from the issue text.
Description
This is about the wording in the haddock comment
https://hackage-content.haskell.org/package/vector-0.13.2.0/docs/Data-Vector.html#v:fromListN
Convert the first n elements of a list to a vector. It's expected that the supplied list will be exactly n elements long.
What is the meaning of "expected"? What happens when the expectation is not met?
- list longer than n: seems to work fine: builds vector from the n-element prefix, as stated in first sentence
V.fromListN 4 "foobar" => "foob" - list shorter than n: builds vector from full list, consistent with behaviour of Data.List.take
V.fromListN 8 "foobar" => "foobar"
- Dominant language
- Haskell
- Stars
- 401
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/vector
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
koalaman/shellcheck#3539 ·
-
time-manager-0.4.0 Openfailure: bounds
Difficulty 1/5 Under an hour Newbie friendliness 72/100
commercialhaskell/stackage#8122 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/phino#1350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100