Some error nits#3682
Open
mtzguido wants to merge 6 commits into
Open
Conversation
527550e to
e521462
Compare
The first character on a line is taken to be at position 1 by other compilers and IDEs, make it so for F* too.
This prints errors like
```
* Error 189 at X.fst:3.13-3.16:
- Expected expression of type Prims.int
got expression 'a'
of type FStar.Char.char
```
Where X.fst:
```
module X
let x = 1 + 'a'
```
Clicking on the error location in VS code highlights over the `'a'`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes F* print errors like
Where X.fst:
Clicking on the error location in VS code highlights over the
'a'. It requires offsetting the column in source positions by 1, to make them 1-based instead of 0-based, as I think other tools do.Marking as a draft since it requires patches to interactive modes to deal with the offset (or as an alternative we could just change the show instance of range to add a +1 there). This also removes the bold style in errors and warnings.