Smarter solving
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the mapVec example in this issue and review the related work in issues #28 and #29. The work is done when the typechecker can infer the recursive call's number argument from vector-size preservation and cons usage, without requiring an explicit succ(_) match.
Written by the indexing model from the issue text.
Description
In our journey to close #28 and #29, there are places where we could be doing better. For example, we fail on the following example:
mapVec(X :: *, Y :: *, { X -> Y }, n :: #, Vec(X, n)) -> Vec(Y, n)
mapVec(_, _, _, _, []) = []
mapVec(_, _, f, _, x ,- xs) = f(x) ,- mapVec(!, !, f, !, xs)
because we can't solve the number argument to the recursive call to mapVec. If we help the typechecker by matching on the number as succ(_) then we can work it out, but this shouldn't be necessary! We know that mapVec preserves vector size, so we should be able to work out from the use of cons that the argument needs to be n - 1
- Dominant language
- Haskell
- Stars
- 8
- Forks
- 1
- 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 Quantinuum/brat
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Quantinuum/brat#135 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Quantinuum/brat#130 ·
-
Quantinuum/brat#129 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Quantinuum/brat#128 ·
-
Quantinuum/brat#127 · 1 assignee ·
Similar issues
-
time-manager-0.4.0 Openfailure: bounds
Difficulty 1/5 Under an hour Newbie friendliness 72/100
commercialhaskell/stackage#8122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simplex-chat/simplex-chat#7547 ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 90/100
alunduil/alunduil-chezmoi#775 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/phino#1350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100