Sebastian Ullrich
da865fc33a
refactor(frontends/lean/{vm_,}elaborator): move name resolution over to parser locals
...
In the end I wasn't quite sure whether this is necessary, but it's at least simpler.
2019-01-12 14:14:22 +01:00
Sebastian Ullrich
807b460e9c
feat(*/elaborator): pass preresolved names to C++ as annotations and use them for global name resolution
...
With actual preresolution still missing, the only preresolved names so far are
ones like `opt_param` from built-in macros that have been preresolved manually
(and which weren't successfully resolved before this commit because of the macro
scopes applied to them)
2019-01-01 23:59:23 +01:00
Sebastian Ullrich
8753491cb5
chore(library/placeholder): remove obsolete level one_placeholder
...
Remnant of the previous Type/Sort approach
2018-12-21 15:52:56 +01:00
Sebastian Ullrich
db6b1d6e85
feat(frontends/lean/vm_elaborator,library/init/lean/elaborator): pass parser_state between languages, create parser object on C++ side to existing functions (that don't actually parse anything)
2018-12-18 15:30:38 +01:00
Sebastian Ullrich
4e96f092f9
feat(library/init/lean/elaborator): delegate elaboration of attribute
2018-12-14 17:38:19 +01:00
Sebastian Ullrich
d9a22d43b2
feat(library/vm/vm_aux): add primitive for calling old elaborator
2018-12-14 17:36:56 +01:00
Sebastian Ullrich
c8eaee74b4
feat(frontends/lean,library/init/lean/parser/combinators): add node_longest_choice! macro
2018-11-19 18:02:28 +01:00
Sebastian Ullrich
7d7d15f8f7
chore(frontends/lean/elaborator): improve error positions
2018-11-19 15:28:23 +01:00
Sebastian Ullrich
2f8e6cc975
chore(frontends/lean/elaborator,library/compiler/compiler): avoid error recovery errors
2018-11-14 09:52:22 +01:00
Sebastian Ullrich
090c4c0ce7
feat(library/init/lean/syntax): add lazily propagated macro scopes to syntax_node
2018-11-06 16:46:50 +01:00
Sebastian Ullrich
8c27f0aac6
refactor(frontends/lean/elaborator,library/init/lean): finish no_kind refactoring
2018-11-04 20:24:40 +01:00
Sebastian Ullrich
09aa4f9ab3
chore(frontends/lean/elaborator): don't try to recover from errors in patterns
2018-11-04 19:03:00 +01:00
Sebastian Ullrich
0d7ea62f9a
perf(frontends/lean/elaborator,library/init/lean): put out_params first to benefit from instance pre-filtering
2018-10-30 17:43:05 +01:00
Sebastian Ullrich
8a3e7821d7
fix(frontends/lean/elaborator): weaken assertion
...
There are still some cases like errors in nested equations that leak
metavariables, but as long as we report at least one error, that probably isn't
a high-priority issue.
2018-10-30 17:43:05 +01:00
Leonardo de Moura
9256618d67
chore(library/vm): remove vm_name
2018-10-23 11:32:56 -07:00
Leonardo de Moura
5d726eb210
feat(library/compiler/compiler): switch to new compiler frontend
...
We also rename `vm_compiler` module to `emit_bytecode`.
We will eventually replace this module with the new IR emitter.
2018-10-08 17:38:17 -07:00
Leonardo de Moura
e75d8eacb6
fix(frontends/lean/elaborator): compilation erros with g++ 4.9
2018-10-08 11:54:28 -07:00
Sebastian Ullrich
305984bab5
feat(frontends/lean/elaborator): show context of unassigned mvars
2018-10-08 09:32:41 -07:00
Sebastian Ullrich
50e6b42f8c
fix(frontends/lean/elaborator): ensure_no_unassigned_metavars: only check mvars in parameter
...
Had forgotten to re-check the standard lib...
2018-10-07 21:11:02 -07:00
Sebastian Ullrich
aea86eb828
feat(frontends/lean/elaborator): simple, accurate mvar error position tracking
...
The accuracy of `m_last_pos` still needs to be improved at some point
2018-10-05 21:25:39 -07:00
Sebastian Ullrich
c50b89a318
fix(frontends/lean/elaborator): node!/node_choice!: use constant options for printing-parsing
2018-10-04 14:27:24 -07:00
Sebastian Ullrich
25b9deab15
fix(frontends/lean/elaborator): fix try_monad_coercion
2018-10-02 14:55:28 -07:00
Leonardo de Moura
990fbe3c30
feat(library/compiler): provide options to vm_compile
2018-09-30 08:50:40 -07:00
Sebastian Ullrich
6cbb77c068
fix(frontends/lean/elaborator): node!: fix view code of try block
2018-09-28 13:08:24 -07:00
Sebastian Ullrich
e661aaeacf
refactor(library/init/lean/parser): store registered parsers in configs, use config hierarchy to avoid mutually recursive types
...
And other refactorings along the way
2018-09-27 10:05:10 -07:00
Sebastian Ullrich
18cf4d50bb
chore(frontends/lean/elaborator): ignore error caused by synthetic sorry
2018-09-25 16:48:01 -07:00
Sebastian Ullrich
90984a63e8
chore(frontends/lean/elaborator): improve application error positions
2018-09-25 16:08:57 -07:00
Sebastian Ullrich
11259b62d2
chore(frontends/lean/elaborator): try to make error positions a bit more accurate
2018-09-25 14:48:57 -07:00
Sebastian Ullrich
f29a866cb4
perf(frontends/lean/elaborator): do not inline views for now
2018-09-24 18:24:27 -07:00
Sebastian Ullrich
32f4d52e1c
refactor(library/init/lean): revert introduction of tysyntax; push syntax.missing through views
2018-09-24 18:24:27 -07:00
Sebastian Ullrich
aac3627ce1
fix(frontends/lean/elaborator): restore better field notation error message
2018-09-24 18:24:27 -07:00
Sebastian Ullrich
9a0b1c7a7f
feat(library/init/lean/parser/basic): allow views to specify default value used with opt_param when nested in other views
2018-09-24 09:53:28 -07:00
Sebastian Ullrich
41c0bc87fd
refactor(library/init/lean/parser): make views shallow via tysyntax
2018-09-22 21:24:38 -07:00
Sebastian Ullrich
0a8d0a6870
feat(library/init/lean/parser/term): projection notation
2018-09-20 09:40:21 -07:00
Sebastian Ullrich
98e09c274f
feat(library/init/lean/parser/{pratt,level}): factor out pratt combinator, implement level parsers
2018-09-13 16:38:40 -07:00
Leonardo de Moura
df9d0b2211
fix(frontends/lean/elaborator): avoid internal identifiers leaking as "user names" in equations
2018-09-12 15:09:44 -07:00
Sebastian Ullrich
af99f153f8
refactor(library/module{,_mgr},frontends/lean/parser): use absolute module names everywhere for identifying modules, move actual importing from parser to module_mgr
2018-09-11 13:55:25 -07:00
Sebastian Ullrich
38208802c6
refactor(*): replace log_tree with simple message_log list, make module_mgr synchronous
2018-09-11 13:55:25 -07:00
Leonardo de Moura
3e5f59d6df
chore(kernel): remove expr.quote constructor
...
In Lean4, we will reify expressions.
2018-09-07 22:08:08 -07:00
Leonardo de Moura
13fbd8304e
chore(library,frontends/lean): use is_constructor, is_recursor, is_inductive helper functions
...
They do not throw exception if the constant is not declared in the environment.
2018-09-07 20:36:42 -07:00
Leonardo de Moura
58e91559d0
feat(*): use new inductive datatype module
2018-09-06 18:09:22 -07:00
Leonardo de Moura
4773a3be5f
feat(library/constructions/no_confusion): add no_confusion_type for new inductive datatype module
2018-09-05 09:55:13 -07:00
Leonardo de Moura
78f4edaf57
chore(frontends/lean): remove info_manager and interactive modules
2018-09-04 17:22:16 -07:00
Leonardo de Moura
dd03747d22
chore(kernel): univ_param vs lparam, level_param_names ==> names, and other inconsistencies
2018-09-03 13:05:42 -07:00
Sebastian Ullrich
76741ae695
feat(frontends/lean/elaborator): fall back to approximate position in errors
2018-09-02 18:34:57 -07:00
Sebastian Ullrich
ae70158c09
fix(frontends/lean/elaborator): position information for callees
2018-09-02 18:08:41 -07:00
Sebastian Ullrich
39cdae50ee
feat(library,frontends/lean): use mdata instead of hacky cache for position information in preterms
2018-09-02 18:08:41 -07:00
Sebastian Ullrich
93d13ffea3
chore(library/init/lean): lean.parser.reader ~> lean.parser
2018-08-30 16:34:47 -07:00
Sebastian Ullrich
2528aee72b
refactor(library/init/lean/parser/reader): use different monad stacks for different parts of the reader
2018-08-29 16:42:24 -07:00
Sebastian Ullrich
46f734b1b1
refactor(library/init/lean/parser/reader): replace macro with syntax_node_kind
...
Also make sure that the name inside a node kind is the full name of the
declaration. This way, we cannot have accidentally conflicting node kind names.
2018-08-28 13:13:14 -07:00