Applying a function to too few arguments produces a difficult to understand error #1765
Labels
documentation debt
Documentation tasks previously deferred, postponed, etc.; technical debt in documentation
documentation
Issues involving documentation
topics: error-messages
Issues involving the messages SAW produces on error
type: bug
Issues reporting bugs or unexpected/unwanted behavior
usability
An issue that impedes efficient understanding and use
Milestone
Assume a helper function:
If a developer forgets to pass in the
name
argument, they get an error like:In my experience, new users have no idea what this is trying to say. Some specific problems with it:
Type Mismatch, expected: t.1 (t.2, t.3) but got: String -> LLVMSetup (Term, SetupValue)
which communicates that the proof writer failed to provide aString
argument. Unfortunately, this error message is attached to many lines of SAW source (87:27-99:2
), while the somewhat uselessType constructors mismatch
is attached to a much narrower code range leading new users to focus on that error.LLVMSetup
doesn't appear at all in the SAW manual. Neither does<Block>
.pointer_to_fresh
call with a missing argument is on line 88. However, the error directs users to lines 87-99 (a broad range that hardly helps to narrow things down) and line 87 (the declaration for the function that contains the badpointer_to_fresh
call). Learners might be able to fix these errors more easily if they're pointed to the right line.When applying a function to too many arguments, you get the helpful suggestion:
It would be great to do the same when applying a function to too few arguments.
The text was updated successfully, but these errors were encountered: