Skip to content

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.

mtzguido added 3 commits July 12, 2025 21:55
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