Better location information for saw-script type error messages #140
Labels
better-in-python
Will be fixed by switching to python frontend
topics: error-messages
Issues involving the messages SAW produces on error
type: enhancement
Issues describing an improvement to an existing feature or capability
Milestone
When the saw-script type checker reports an error message, it only reports the location of the top-level definition in which the error occurred. This is not very helpful, especially if your script consists mainly of one big
main
function with lots of statements inside. It would be much better if the error message could provide at least the location of the statement containing the error.Currently pattern variables are the only parts of the saw-script parser AST that have location information (specifically, this includes the
x
inlet x = ...
andx <- ...
). We need to extend the AST and lexer to save location information for more things, e.g. statements that don't bind a new variable. This would make it possible to report much more accurate locations for errors.The text was updated successfully, but these errors were encountered: