Commit graph

12 commits

Author SHA1 Message Date
jrr6
4759506bcf
chore: use note and hint' for message addenda (#8980)
This PR improves the consistency of error message formatting by
rendering addenda of several existing error messages as labeled notes
and hints.
2025-06-27 15:16:01 +00:00
Kim Morrison
da32bdd79c
chore: additional newline before 'additional diagnostic information' message (#7169)
This PR adds an addition newline before the "Additional diagnostic
information may be available using the `set_option ... true` command."
messages, to provide better visual separation from the main error
message.
2025-02-23 23:27:33 +00:00
Kim Morrison
dcea47db02
chore: shorten suggestion about diagnostics (#4882)
This message is often incorporated into source files via `#guard_msgs`.
This change ensures it won't go over the 100 character ruler, and I
think is equally grammatical. :-)
2024-07-31 17:56:43 +00:00
Kyle Miller
d5e7dbad80
fix: make "use `set_option diagnostics true" message conditional on current setting (#4781)
It is confusing that the message suggesting to use the `diagnostics`
option is given even when the option is already set. This PR makes use
of lazy message data to make the message contingent on the option being
false.

It also tones down the promise that there is any diagonostic information
available, since sometimes there is nothing to report.

Suggested by Johan Commelin.
2024-07-31 03:53:09 +00:00
Leonardo de Moura
de5e039c83
fix: type class issues with maxSynthPendingDepth := 1 (#4119)
Summary:

- Take `synthPendingDepth` into account when caching TC results
- Add `maxSynthPendingDepth` option with default := 2.
- Add support for tracking `synthPending` failures when using
`set_option diagnostics true`

closes #2522
closes #3313
closes #3927

Identical to #4114  but with `maxSynthPendingDepth := 1`

closes #4114 

cc @semorrison
2024-05-14 03:03:32 +00:00
Leonardo de Moura
09de37e8e5 chore: improve error message 2021-02-05 12:26:39 -08:00
Sebastian Ullrich
b2b78eb222 test: use printMessageEndPos for leantests 2021-01-15 16:27:59 +01:00
Leonardo de Moura
48b92a4486 fix: error message and test 2020-12-25 10:03:42 -08:00
Leonardo de Moura
b855d79718 feat: filter "failed to synthesize ..." errors when there are other errors 2020-12-25 10:03:42 -08:00
Leonardo de Moura
d4f48cbfa3 feat: improve error message "don't know how to synthesize implicit argument" 2020-12-09 14:09:30 -08:00
Leonardo de Moura
975271e1a3 feat: hide inaccessible names and add pp.inaccessibleNames
@Kha We will probably have to refine the heuristic for hiding the
inaccessible names, but the first version is already useful.
Here is the error message for a `_` before this commit
```
error: don't know how to synthesize placeholder
context:
x✝⁴ : List Nat
x✝³ : Nat
x✝² : x✝⁴ ≠ []
a b x✝¹ : Nat
x✝ : [a, b] ≠ []
⊢ Nat
```
After
```
error: don't know how to synthesize placeholder
a b : Nat
 : [a, b] ≠ []
⊢ Nat
```
2020-11-25 17:22:09 -08:00
Leonardo de Moura
f220654a27 feat: default instances 2020-11-21 14:44:40 -08:00