Commit graph

24 commits

Author SHA1 Message Date
Leonardo de Moura
2652cc18b8
chore: error messages consistency (#10143)
This PR standardizes error messages by quoting names with backticks. The
changes were automated, so some cases may still be missing.
2025-08-26 17:55:43 +00:00
JovanGerb
c96797eb93
fix: show argument name in implicit argument error (#4426)
When an implicit argument cannot be inferred, the error should show the
name of the argument.

Showing the argument name in the error message for an uninstantiated
metavariable was introduced in da33f498f5,
but this implementation causes some argument names to get lost.
2024-06-14 18:08:42 +00:00
Kyle Miller
d39b0415f0
feat: enable pp.fieldNotation.generalized globally (#3744)
Sets the default value to `pp.fieldNotation.generalized` to `true`.
Updates tests, and fixes some minor flaws in the implementation of the
generalized field notation pretty printer.

Now generalized field notation won't be used for any function that has a
`motive` argument. This is intended to prevent recursors from pretty
printing using it as (1) recursors are more like control flow structures
than actual functions and (2) generalized field notation tends to cause
elaboration problems for recursors.

Note: be sure functions that have an `@[app_unexpander]` use
`@[pp_nodot]` if applicable. For example, `List.toArray` needs
`@[pp_nodot]` to ensure the unexpander prints it using `#[...]`
notation.
2024-03-23 02:38:09 +00:00
Sebastian Ullrich
bddb2152e5
chore: default compiler.enableNew to false until development restarts (#3034) 2023-12-21 07:48:25 +00:00
Leonardo de Moura
ec42581d1f perf: use Core.transform instead of Meta.transform at betaReduceLetRecApps
Observed big performance improvement on files containing big proofs
generated using tactics.
2023-06-28 12:29:12 -07:00
Gabriel Ebner
a67a5080e9 chore: fix tests after hash change 2022-12-01 20:18:14 -08:00
Leonardo de Moura
15e2a7d5b4 feat: report errors an unassigned metavars at #eval
See #1256
2022-06-29 11:53:33 -07:00
Leonardo de Moura
7d99f6f555 perf: isClassQuick? was incorrectly producing undef
Then `isClassExpensive?` was being invoked too often. In some
benchmarks the performance hit was substantial. For example,
in the new test `state8.lean`. The runtime on my machine went from 2s
to 0.76s.
2022-04-09 10:38:49 -07:00
Leonardo de Moura
5d8b4f33c0 feat: improve binder names introduced by the match discriminant refinement feature 2022-04-08 06:49:09 -07:00
Leonardo de Moura
f9fa24435d chore: remove problematic instance hasOfNatOfCoe
See #403
See https://github.com/leanprover-community/mathport/issues/94
2022-01-20 14:47:25 -08:00
Leonardo de Moura
b278a20ac2 feat: ensure #eval converts unassigned universe metavars into parameters
see #898
2021-12-20 06:11:36 -08:00
Leonardo de Moura
c93982d10c chore: disable pp.analyze for now
see #651
2021-09-07 07:51:43 -07:00
Daniel Selsam
0036111db9 feat: pp.analyze original mvars are not unknown 2021-08-03 09:13:18 +02:00
Daniel Selsam
c3d62c1076 chore: patch tests for pp.analyze default 2021-08-03 09:13:18 +02:00
Sebastian Ullrich
b2b78eb222 test: use printMessageEndPos for leantests 2021-01-15 16:27:59 +01:00
Leonardo de Moura
c524bcf2d3 feat: improve universe level pretty printer 2020-12-21 07:34:48 -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
0fe705f3a1 feat: improve error messages for unassigned metavariables
cc @Kha
2020-09-29 17:18:03 -07:00
Sebastian Ullrich
3834a89cdc feat: activate new pretty printer 2020-09-17 08:12:28 -07:00
Sebastian Ullrich
897f277a3e test: strip mvar suffixes 2020-09-15 09:32:00 -07:00
Leonardo de Moura
fde43e071d feat: improve matchType inference 2020-09-14 19:44:45 -07:00
Leonardo de Moura
0967ad7e91 feat: extend/cleanup isLevelDefEqAux
`tests/lean/run/toExpr.lean` could not be processed by the new
frontend without these extensions.
2020-09-12 15:38:48 -07:00
Leonardo de Moura
09244c73f4 fix: lval resolution 2020-09-12 07:45:36 -07:00
Leonardo de Moura
cc520d422c fix: ensure no unassigned mvars at #eval 2020-09-12 07:18:43 -07:00