mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Fix List.range type annotation bug
This commit is contained in:
parent
234f9f54cd
commit
7d8b9b2323
1 changed files with 1 additions and 9 deletions
|
@ -657,15 +657,7 @@ mapWithIndexHelp = \src, dest, func, index, length ->
|
|||
##
|
||||
## All of these options are compatible with the others. For example, you can use `At` or `After`
|
||||
## with `start` regardless of what `end` and `step` are set to.
|
||||
# TODO: Make the type annotation work
|
||||
# range :
|
||||
# {
|
||||
# start : [At (Int a), After (Int a)],
|
||||
# end : [At (Int a), Before (Int a), Length Nat],
|
||||
# # TODO: We want this to be Int *, but that requires the ability to convert or add from Int * to Int a
|
||||
# step ? Int a
|
||||
# }
|
||||
# -> List (Int a) | a has Bool.Eq
|
||||
range : _
|
||||
range = \{ start, end, step ? 0 } ->
|
||||
{ incByStep, stepIsPositive } =
|
||||
if step == 0 then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue