implement main0 () = {
var arr: @[int][N]
val () = arr[0] := 5
val () = arr[1] := 4
val () = arr[2] := 3
implement array_quicksort$cmp<int> (x, y) = compare (x, y)
val () = array_quicksort<int> (arr, i2sz N)
}
However, it causes following error.
$ patscc main.dats
/home/kiwamu/src/practice-ats/array_quicksort/main.dats: 374(line=15,
offs=34) -- 377(line=15, offs=37): error(3): the dynamic expression
cannot be assigned the type [S2Etyarr(S2Eapp(S2Ecst(INV);
S2Ecst(int)); S2EVar(4391))].
/home/kiwamu/src/practice-ats/array_quicksort/main.dats: 374(line=15,
offs=34) -- 377(line=15, offs=37): error(3): mismatch of static terms
(tyleq):
The actual term is: S2Etop(knd=0; S2Eapp(S2Ecst(g0int_t0ype);
S2Eextkind(atstype_int)))
The needed term is: S2Eapp(S2Ecst(g0int_t0ype); S2Eextkind(atstype_int))
implement main0 () = {
var arr: @[int][N]
val () = arr[0] := 5
val () = arr[1] := 4
val () = arr[2] := 3
implement array_quicksort$cmp<int> (x, y) = compare (x, y)
val () = array_quicksort<int> (arr, i2sz N)
}
However, it causes following error.
$ patscc main.dats
/home/kiwamu/src/practice-ats/array_quicksort/main.dats: 374(line=15,
offs=34) -- 377(line=15, offs=37): error(3): the dynamic expression
cannot be assigned the type [S2Etyarr(S2Eapp(S2Ecst(INV);
S2Ecst(int)); S2EVar(4391))].
/home/kiwamu/src/practice-ats/array_quicksort/main.dats: 374(line=15,
offs=34) -- 377(line=15, offs=37): error(3): mismatch of static terms
(tyleq):
The actual term is: S2Etop(knd=0; S2Eapp(S2Ecst(g0int_t0ype);
S2Eextkind(atstype_int)))
The needed term is: S2Eapp(S2Ecst(g0int_t0ype); S2Eextkind(atstype_int))