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

Some error nits #3682

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Some error nits #3682

wants to merge 3 commits into from

Conversation

mtzguido
Copy link
Member

This makes F* print 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'. 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.

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'`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant