Leonardo de Moura
da09ef4f66
feat(frontends/lean/builtin_exprs): minor improvement
2019-06-24 15:48:11 -07:00
Leonardo de Moura
24e3bff429
feat(frontends/lean): add simple parser! macro
2019-06-24 15:48:11 -07:00
Leonardo de Moura
6a740723a4
chore(frontends/lean): remove node! and nodeChoice! macros
...
They were used in the parsing framework based on `Parsec`
2019-06-24 15:48:11 -07:00
Leonardo de Moura
4ab31275a4
chore(library/init, frontends/lean): remove foldl and foldr notation, and implement list notation in the old parser
2019-06-20 14:32:08 -07:00
Leonardo de Moura
807ec2169a
chore(frontends/lean/notation_cmd): remove scoped notation support
2019-06-20 14:13:56 -07:00
Leonardo de Moura
00aa2a3ffe
chore(library/user_recursors): remove [recursor] attribute and environment extension
2019-06-20 11:25:53 -07:00
Leonardo de Moura
1e30f76511
chore(frontends/lean/pp): remove ppAsAnonymousCtor attribute
2019-06-20 11:03:20 -07:00
Leonardo de Moura
64a592899f
chore(frontends/lean/notation_cmd): remove parsingOnly attribute
2019-06-20 11:00:40 -07:00
Leonardo de Moura
e0ddacfd3e
feat(library/init/lean/attributes,frontends/lean): allow attributes to specify when they should be applied
2019-06-20 09:17:03 -07:00
Leonardo de Moura
e86e6af049
feat(library/init/lean/attributes): add applicationTime field and remove unnecessary parameters
2019-06-20 08:48:26 -07:00
Leonardo de Moura
2b453de299
fix(frontends/lean/decl_attributes): remove mdata
2019-06-18 15:25:34 -07:00
Leonardo de Moura
50f8d232c3
feat(frontends/lean/decl_attributes): add expr_to_syntax
2019-06-18 15:17:46 -07:00
Leonardo de Moura
d664486eca
chore(util): move format to src/util
2019-06-07 10:58:23 -07:00
Leonardo de Moura
12809945ba
chore(util/sexpr/format): use Lean implementation
2019-06-07 10:45:42 -07:00
Leonardo de Moura
f6b9a0fe9c
chore(util/sexpr/format): preparing to switch to Lean implementation
2019-06-07 09:46:34 -07:00
Leonardo de Moura
7beb74fb0f
chore(util/sexpr/format): remove dead code
2019-06-07 09:28:30 -07:00
Leonardo de Moura
0553d60dbf
feat(library/compiler/util): switch to new attributes implemented in Lean
2019-06-06 15:40:39 -07:00
Leonardo de Moura
2a557b1bbd
feat(frontends/lean/decl_attributes): connect old frontend to new attribute manager
2019-06-06 10:43:09 -07:00
Leonardo de Moura
95b3ad69f9
chore(frontends/lean): remove parsing_only and prio from old attribute parser
...
This is a preparation for adding new attribute manager to the old frontend.
2019-06-05 15:01:03 -07:00
Leonardo de Moura
9310c807e6
feat(library/private): use environment extension in Lean
...
Remark: we don't need the `m_inv_map` anymore.
2019-06-03 11:50:33 -07:00
Leonardo de Moura
377b1ca042
chore(library/private): cleanup
2019-06-03 09:38:10 -07:00
Leonardo de Moura
fc0ce5b97e
chore(library/aliases, frontends/lean): remove local_ref's
...
We don't need them since we removed parameters
2019-05-27 21:28:22 -07:00
Leonardo de Moura
8c6ae127c9
chore(library/scoped_ext): remove dead code
2019-05-27 21:28:22 -07:00
Leonardo de Moura
aa138fe686
chore(*): get_obj_arg => to_obj_arg
2019-05-16 14:42:02 -07:00
Leonardo de Moura
9d9f546ad8
refactor(util/sexpr): move options and option_declarations to util
2019-05-16 14:37:24 -07:00
Leonardo de Moura
9c4da289b2
refactor(util/sexpr/options): options as a Lean object
2019-05-16 14:27:44 -07:00
Leonardo de Moura
31d4fa9f71
chore(util/sexpr/options): shrink options API
...
Motivation: move to the Lean implementation
2019-05-16 14:08:11 -07:00
Leonardo de Moura
edeae776da
chore(library/module): module::add for declarations is not needed anymore
2019-05-14 11:23:35 -07:00
Leonardo de Moura
99e3cdc01b
chore(frontends/lean): delete lean_environment
2019-05-13 13:05:04 -07:00
Leonardo de Moura
edb4d76ecd
feat(kernel/environment): environment as a Lean object
2019-05-13 12:41:33 -07:00
Leonardo de Moura
fd487d8db7
chore(*): remove old VM
2019-05-08 15:15:44 -07:00
Leonardo de Moura
0d1a0c8b6e
chore(library): toBool ==> decide
...
We want to define a type class similar to Haskell's `ToBool`.
2019-05-06 14:02:15 -07:00
Sebastian Ullrich
1aef9ac576
feat(frontends/lean/match_expr): terminate match on dedent between equations
2019-05-03 13:46:10 +02:00
Leonardo de Moura
cd21793b53
fix(frontends/lean/elaborator): assertion violation
...
Prevent assertion violation when processing examples such as:
```
@[pattern] def badPattern (x : Nat) : Nat := 0
def tst (y : Nat) : Nat :=
match y with
| (@badPattern _) := 1
| _ := 2
```
The `x` is not used in `badPattern`. Thus, the elaborator fails to
synthesize the metavariable corresponding to `_` at `@badPattern _`.
The fix detects this kind of instance, but I commented the code the
throws the error because we would prevent us from compiling `term.lean`.
The assertion violation was originally triggered by the pattern definition
```
@[pattern] def «explicitBinderContent» (requireType : optParam.{1} Bool Bool.false) :=
{SyntaxNodeKind . name := `Lean.Parser.Term.explicitBinderContent}
at
...
view := fun stx, let (stx, i) := match stx.asNode : _ -> Prod Syntax Nat with
| some {kind := @«explicitBinderContent» requireType, -- << HERE
args := [stx], ..} := ...
```
These definitions were generated by the node choice macro.
cc @kha
2019-03-27 16:42:59 -07:00
Leonardo de Moura
9a071c18e7
feat(library/equations_compiler): add support for partial definitions
2019-03-27 11:09:32 -07:00
Leonardo de Moura
9ddc778ac3
feat(library/equations_compiler/equations): add m_is_partial to equation header
2019-03-26 16:18:43 -07:00
Leonardo de Moura
1f11429f98
feat(frontends/lean): add partial keyword
2019-03-26 16:09:55 -07:00
Sebastian Ullrich
2df060be44
feat(frontends/lean/elaborator): node!: support parameterized parsers
2019-03-26 11:21:53 +01:00
Sebastian Ullrich
7c0912d41c
refactor(frontends/lean/lean_environment): move environment parts out of lean_elaborator.cpp
2019-03-25 16:12:14 +01:00
Sebastian Ullrich
e3ea2e84d2
feat(frontends/lean/lean_elaborator): set position of #check output etc.
2019-03-23 23:13:09 +01:00
Leonardo de Moura
3d52298c69
chore(util/sexpr): preparing to port options to Lean
2019-03-22 13:58:16 -07:00
Leonardo de Moura
50207e2c5a
chore(library/constants.txt): remove dead variables
2019-03-22 13:26:48 -07:00
Leonardo de Moura
930653f292
chore(library/init): Unit.star => Unit.unit
...
@kha Our stdlib is starting to match the names we used in our paper :)
2019-03-22 13:06:45 -07:00
Leonardo de Moura
c017686f70
fix(frontends/lean/lean_elaborator): pre_equations => preEquations
2019-03-21 15:11:05 -07:00
Leonardo de Moura
7982420d8d
fix(library/init/lean/expander, frontends/lean/lean_elaborator): conversion issues
2019-03-21 15:06:46 -07:00
Leonardo de Moura
5f2b74df72
fix(frontends/lean/util): another mismatch to naming convention change
2019-03-21 15:06:46 -07:00
Leonardo de Moura
870a0456c4
fix(frontends/lean/builtin_exprs): match name used at elaborator.lean
2019-03-21 15:06:46 -07:00
Sebastian Ullrich
d5ec4a4606
chore(frontends/lean/pp): ppAnonymousCtor -> ppAsAnonymousCtor
2019-03-21 15:06:45 -07:00
Leonardo de Moura
2be87ecd92
chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false
2019-03-21 15:06:44 -07:00
Leonardo de Moura
855dab52e0
chore(library/init/Lean): more fixes
...
`elaborator.lean` is almost working
2019-03-21 15:06:44 -07:00