Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upPoor error message on unbound variable #217
Comments
This comment has been minimized.
This comment has been minimized.
|
Yeah, we can add the variable name to the error message. For some context: https://github.com/dhall-lang/dhall-haskell/blob/master/src/Dhall/TypeCheck.hs#L743-L744 The original reason I recommended against the error message having the variable name is because the source span for the error should be localized to exactly the unbound variable. However, for some reason it looks like that didn't work here, so it's probably worth including the variable name in the error message as a fallback. |
This comment has been minimized.
This comment has been minimized.
|
Actually, I think I found the root cause for why the source span localization was so bad. This was related to the recent support for type synonyms and it's pretty simple fix, which produces this much better output:
Once I fix that would that satisfy your concerns or would you still like to see the name of the unbound variable on the |
Gabriel439
added a commit
that referenced
this issue
Jan 21, 2018
This comment has been minimized.
This comment has been minimized.
|
Fix up in #218 Try that out and see if that improves the error messages for you. If it does, then I'll merge |
This comment has been minimized.
This comment has been minimized.
|
As long as something shows me the erroneous variable then I think I'm ok
with it. Will check that out
…On 21 Jan 2018 5:54 am, "Gabriel Gonzalez" ***@***.***> wrote:
Fix up in #218 <#218>
Try that out and see if that improves the error messages for you. If it
does, then I'll merge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#217 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABRjjjtAIM2HTjVE_7APrHnPdkCCDTgks5tMtEXgaJpZM4RlbUp>
.
|
Gabriel439
added a commit
that referenced
this issue
Jan 21, 2018
This comment has been minimized.
This comment has been minimized.
|
In that case I will go ahead and close this since it should print the source span equivalent to the unbound variable now (assuming no other bugs in source span localizaiton) |
ocharles commentedJan 20, 2018
Given
I get:
The unbound variable is
repo, but the error message doesn't tell me that.