The program below is obviously incorrect (index array too large) but it gives a Haskell error message (Prelude.(!!): index too large) instead of something from Ziria.
let f(a:arr int) =
let b = {3,4,5} in
let c = b[5] in
return c
in
read[int] >>> emit f({1,2}) >>> write[int]
similarly:
The following code:
let table = {3, 10, 7, 12, 19, 42, 7, 16, 7, 18, 11, 20, 5, 22, 11, 24, 7, 26, 41, 84, 103} in
reg1[0] := reg1[table[-5]];
causes compiler error:
Prelude.(!!): negative index
because compiler wants to inline without checking the index...
The program below is obviously incorrect (index array too large) but it gives a Haskell error message (Prelude.(!!): index too large) instead of something from Ziria.
let f(a:arr int) = let b = {3,4,5} in let c = b[5] in return c in
read[int] >>> emit f({1,2}) >>> write[int]
similarly:
The following code: let table = {3, 10, 7, 12, 19, 42, 7, 16, 7, 18, 11, 20, 5, 22, 11, 24, 7, 26, 41, 84, 103} in reg1[0] := reg1[table[-5]];
causes compiler error: Prelude.(!!): negative index because compiler wants to inline without checking the index...