Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol not found is sometimes misleading #318

Closed
shym opened this issue Aug 28, 2023 · 1 comment · Fixed by #325
Closed

Symbol not found is sometimes misleading #318

shym opened this issue Aug 28, 2023 · 1 comment · Fixed by #325

Comments

@shym
Copy link
Contributor

shym commented Aug 28, 2023

The message Symbol not found is used in many cases, some of which I find rather hostile to newcomers.

On the following example:

(*@ val g: int -> int *)

val f : int -> int
(*@ r = f x
    ensures r = g x *)

gospel check reports:

File "abc.mli", line 5, characters 16-17:
5 |     ensures r = g x *)
                    ^
Error: Symbol g not found.

This is due to the fact that g was not declared as pure.

The same message is used for r in the following:

val f : int -> int
(*@ r = f x
    requires r = 0 *)

where the result is bound in a requires.

Maybe specific messages should be used in those cases to help users understand what is in scope.

@shym
Copy link
Contributor Author

shym commented Sep 1, 2023

#323 proposes to add a documentation page explaining what is in scope in which clauses.
I would propose to reformulate the symbol-not-found error message so that it refers users to that part of the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant