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

Include the file name when reporting Dhall errors #222

Closed
hdgarrood opened this issue May 30, 2019 · 2 comments · Fixed by #241
Closed

Include the file name when reporting Dhall errors #222

hdgarrood opened this issue May 30, 2019 · 2 comments · Fixed by #241
Labels

Comments

@hdgarrood
Copy link
Contributor

For example, if I modify packages.dhall so that there is a syntax error:

$ spago build
spago: 
Error: Invalid input

2:9:
  |
2 | Welcome to your new Dhall package-set!
  |         ^
unexpected 't'
expecting ':', '=', or whitespace

It would be helpful if the error message included the file name "packages.dhall". Likewise for errors involving spago.dhall.

@f-f
Copy link
Member

f-f commented May 30, 2019

@hdgarrood wow, great catch.

I'm not sure where the problem is - since the spago.dhall imports packages.dhall, the error happens on the Dhall side of things (it should be this line), but I'm pretty sure there's an option to get nicer error reporting with filenames (i.e. I think the fix could just be replacing inputExpr with inputFile on that line)

@f-f
Copy link
Member

f-f commented Jun 2, 2019

Fix up in #241

@f-f f-f closed this as completed in #241 Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants