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

[ elab ] Print script's FC in the bad elaboration script error #3079

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

buzden
Copy link
Contributor

@buzden buzden commented Sep 21, 2023

Description

When you are writing (and running) elaborator scripts, occasionally you can get the Bad elaborator script error. Pretty long time ago I suggested a PR that added this bad elaborator script to the error output, and it helped a lot, but required some custom and thought on what's going on. Today, I had such an error with a mystical output, and I thought that printing the position of where the compiler thinks there is a problem is good.

So, I suggest to print not only FC of the call to the script, but also an FC of a position in a script, which cause the Bad elaborator script error itself (it it is present, surely).

One can see in the added test how the error can look like with this change.

Copy link
Member

@gallais gallais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@gallais gallais merged commit a643e3a into idris-lang:main Sep 22, 2023
22 checks passed
@buzden buzden deleted the print-script-fc-in-badelabscript branch September 22, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants