The key innovation is to treat index sets as types
rather than values, and use conventional type infer-
ence to infer iteration spaces. Leaning on inference
leads to a lightweight and expressive looping syntax.
In addition, all shape and indexing errors are static,
and opportunities for parallelism are exposed to the
compiler.
Our starting point is an analogy between arrays
and functions.
From the paper: