Re:Why is Idris 2 so much faster than Idris 1?
by icen on Tuesday May 26, 2020 @05:49AM
(#23309065)
As the workhorse example, consider the length-indexed Vector:
Each Vec has its length in its type. You get a type error if you try the following:
and with that, consider the following program:
The above program doesn't know what the type of `ints` is in the do-block precisely. It has a length specified by the user! But we can reason about its length - and the type system would ensure that its length is propagated and handled properly everywhere we try to use it.
[ Parent
| on HN ]
There are no comments on this comment yet.