Kindelia
Kindelia copied to clipboard
Calling a fun that doesn't exist returns `Not IO term`
When deploying this:
run {
ask x = (Call 'a10000000000' []);
(Done x)
}
it returns:
ERROR: 'FUN:a10000000000:91fd' is not an IO term
since "a10000000000" is not an existent fun, shouldn't it just return something like:
ERROR: Couldn't find 'FUN:a10000000000'
cc @steinerkelvin
When I added this error check, there was really no way to no if a name had been defined before or not (maybe checking if arity was defined for it? this would be clumsy). As I am adding statement indexes, this becomes much easier to fix.
The problem here is actually that when Funs do not reduce they just stay stuck (exactly as in the original HVM). So we would need to (a) make this a runtime error, or (b) make an error specific on call (ugly).
(a) would be something like RuntimeError::FunDoesNotReduce { name, arg_prts: [...] }