Error reference
Every error Velaris can give — scraped from the compiler source itself, so this page cannot go stale. Braces are filled with your program’s names and values; every error also arrives with numbered fixes, and as JSON with --json.
| Code | Message template |
|---|---|
| E000 | unexpected character {source[pos]!r} |
| E001 | cannot find file '{path}' |
| E002 | unknown escape '\\{e}' in text |
| E100 | expected '{want}' but found '{t.text or 'end of file'}' |
| E101 | unexpected '{t.text}' |
| E200 | '{ns}' has no function called '{fname}' |
| E300 | function '{fn.name}' calls '{node.name}' which needs effect '{eff}', but '{fn.name}' {declared} |
| E310 | the '{where}' promise of '{fn.name}' calls '{node.name}' which has effects ({', '.join(sorted(eff))}); promises must be pure |
| E400 | no 'main' function found |
| E401 | '{node.name}' expects {len(ptypes)} argument(s) but got {len(node.args)} |
| E402 | a function value cannot use '{node.name}' from the code around it |
| E403 | remainder by zero |
| E405 | random(n) needs n greater than 0 |
| E406 | this text has {holes} placeholder(s) but got {given} value(s) |
| E407 | this arithmetic made a number too big to hold (whole numbers go from {INT_MIN} to {INT_MAX}) |
| E408 | an exit code must be between 0 and 255, not {code} |
| E500 | unknown type '{ftype}' for field '{fname}' of record '{r.name}' |
| E501 | '{node.name}' is declared {node.ann}, but this is an empty {'list' if empty_list else 'map'} |
| E502 | argument {i} of '{node.name}' is a call to a function that returns nothing |
| E503 | '{fn.name}' promises to return {declared_ret} but this return gives nothing |
| E504 | 'while' needs a yes/no condition (Bool), but this is {c} |
| E505 | 'invariant' must be a yes/no promise (Bool) |
| E506 | cannot tell what an empty list holds |
| E507 | '{r.name}' is used for both a record and a function |
| E508 | unknown record '{node.name}' |
| E509 | record '{node.name}' is missing field(s): {', '.join(missing)} |
| E510 | record '{t}' has no field '{node.field}' |
| E511 | records cannot be changed in place |
| E512 | cannot find imported file '{path}' |
| E513 | function '{f.name}' is defined in both '{fn_src[f.name]}' and '{path}' |
| E514 | '{name}' is the name of an import, so it cannot also be a variable |
| E520 | 'get' on a map can fail - the key may be missing, and that cannot be ignored |
| E521 | 'try' passes failure up, but '{fn.name}' cannot fail |
| E522 | '{node.subject.name}' cannot fail - call it directly, no check needed |
| E523 | 'fail' is used, but '{fn.name}' does not declare it can fail |
| E524 | 'main' cannot be 'or fail' - there is no one above it to handle the failure |
| E525 | '{node.subject.name}' returns nothing - write 'ok {{ ... }}' with no name |
| E530 | '{f2.name}' uses effects ({', '.join(sorted(f2.effects))}) - only pure functions can be passed as values |
| E540 | type variable '{tv}' must appear in at least one parameter (a {tv} only in the return type cannot be inferred) |
| E541 | type variable '{tv}' shadows a real type |
| E542 | '{node.name}' argument {i} should look like {want}, but this is {got} |
| E543 | '{f2.name}' is generic - generic functions cannot be passed as values yet |
| E600 | broken promise: {nice_name(name)} requires {expr_str(expr)} ({vals(expr)}) |
| E601 | broken promise: {nice_name(name)} ensures {expr_str(expr)} ({vals(expr, (retval,))}) |
| E602 | position {i} is outside the text (it has {len(t)} character(s)) |
| E607 | this text grew too large to build |
| E609 | cannot split by empty text |
| E700 | promise cannot be kept: {nice_name(fn.name)} ensures {expr_str(ens_expr)} - proven without running the program: {vals} gives result = {rv} |
| E701 | this call can break a promise: '{fnB.name}' requires {expr_str(r_expr)}, but '{ctx.caller}' can call it with {vals} - proven without running the program |
| E703 | cannot prove the loop keeps 'invariant {expr_str(inv_expr)}' {where} in '{ctx.caller}' - the promises allow: {vals} |
| E704 | loop broke its promise: invariant {expr_str(inv_expr)} ({vals}) |
| E705 | this 'get' can reach position {m.eval(idx, model_completion=True)}, but the list has {m.eval(length, model_completion=True)} item(s) - proven without running the program |
| E706 | this can {word} zero |
| E999 | self-test failed |