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

Raw type printing in some errors #975

Closed
robdockins opened this issue Nov 19, 2020 · 0 comments · Fixed by #1070
Closed

Raw type printing in some errors #975

robdockins opened this issue Nov 19, 2020 · 0 comments · Fixed by #1070
Labels
UX Issues related to the user experience (e.g., improved error messages)
Milestone

Comments

@robdockins
Copy link
Contributor

Cryptol> [0, -1 .. 0 ]

Parse error at <interactive>:1:5--1:7
  The boundaries of .. sequences should be valid numeric types.
The expression `ELocated (ENeg (ELocated (ELocated (ELit (ECNum 1 (DecLit "1"))) (Range {from = Position {line = 1, col = 6}, to = Position {line = 1, col = 7}, source = "<interactive>"})) (Range {from = Position {line = 1, col = 6}, to = Position {line = 1, col = 7}, source = "<interactive>"}))) (Range {from = Position {line = 1, col = 5}, to = Position {line = 1, col = 7}, source = "<interactive>"})` is not.

It seems we are using show directly on type expressions instead of using the pretty printer in this instance, and perhaps in others.

@robdockins robdockins added the UX Issues related to the user experience (e.g., improved error messages) label Nov 19, 2020
@atomb atomb added this to the 2.11.0 milestone Dec 11, 2020
robdockins added a commit that referenced this issue Feb 10, 2021
Previously, raw AST would be printed instead of pretty-printed syntax
Also tweak the indentation for multiline parse errors.

Fixes #975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX Issues related to the user experience (e.g., improved error messages)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants