• Andrei Paskevich's avatar
    Mlw: for-loops over range types · 2f7b69b5
    Andrei Paskevich authored
    In the surface language, the loop index is always int in
    the loop invariant and all annotations and pure terms inside
    the loop. If you want to access the original range-typed index,
    use "let copy_i = i in" in the program code before your assertion.
    Of course, you cannot do that for the loop invariant, which is
    what we want.
typing.ml 48.6 KB