Leonardo de Moura
b634fc30ee
chore(library/init/lean/elaborator/command): add command.lean
2019-07-19 10:54:39 -07:00
Leonardo de Moura
27e0ad0d9e
chore(library/init/lean/compiler/ir/emitcpp): remove constant registration
2019-07-19 10:52:18 -07:00
Leonardo de Moura
f9459f6e93
feat(library/init/lean/syntax): add Syntax.other
...
We will use this feature to implement the new elaborator.
An elaborator produces `Syntax Expr` instead of `Syntax`.
2019-07-19 10:45:01 -07:00
Leonardo de Moura
bf64310603
chore(library/init/lean): minor
2019-07-19 07:21:24 -07:00
Sebastian Ullrich
11ba44ed8a
chore(tests/bench): fix syntax
2019-07-19 10:46:02 +02:00
Leonardo de Moura
b3e0a1d04e
feat(library/init/lean/elaborator/basic): improve error handling, add simple test
2019-07-18 17:52:01 -07:00
Leonardo de Moura
79545f55c0
feat(library/init/io): add IO.readTextFile
2019-07-18 17:31:31 -07:00
Leonardo de Moura
eb7b2b77fa
chore(library/init/lean): minor changes
2019-07-18 17:16:44 -07:00
Leonardo de Moura
99c465b425
feat(library/init/lean/elaborator/basic): add basic error handling functions
2019-07-18 16:37:39 -07:00
Leonardo de Moura
d92cd91ab3
feat(library/init/lean/elaborator/basic): add processCommand and test function
2019-07-18 16:12:18 -07:00
Leonardo de Moura
4e94bdae48
feat(library/init/lean/elaborator/basic): add [elabTerm] and [elabCommand] attributes
2019-07-18 15:27:27 -07:00
Leonardo de Moura
119a890d79
chore(stage0): update
2019-07-18 13:23:22 -07:00
Leonardo de Moura
b1d5a4284d
feat(library/init/lean): address issue raised in the previous commit
...
We also changed the type of `addImportedFn` to `Array (Array α) → IO σ`.
This modification avoids the `unsafeIO` hack at `parser.lean`.
2019-07-18 13:20:46 -07:00
Leonardo de Moura
261d316990
chore(library/init/lean/parser/module): document potential issue
2019-07-18 12:45:26 -07:00
Leonardo de Moura
0f1f23744e
chore(library/init/lean/elaborator/basic): examples
2019-07-17 19:09:16 -07:00
Leonardo de Moura
09c51622a7
chore(stage0): update
2019-07-17 19:09:16 -07:00
Leonardo de Moura
bccad07718
feat(library/init/lean/elaborator/basic): add [builtinCommandElab] attribute
2019-07-17 19:09:16 -07:00
Leonardo de Moura
2f7220402d
chore(stage0): update
2019-07-17 19:09:16 -07:00
Leonardo de Moura
21e973aeaf
feat(library/init/lean/elaborator/basic): add [builtinTermElab] attribute
2019-07-17 19:09:16 -07:00
Leonardo de Moura
20aca8123f
chore(library/init/io): add HasOrelse instance
2019-07-17 19:09:16 -07:00
Leonardo de Moura
73824790a3
feat(library/init/lean/parser/parser): store SyntaxNodeKinds
2019-07-17 19:09:16 -07:00
Leonardo de Moura
eebb8e2e27
feat(library/init/lean/elaborator): add Elab monad
2019-07-17 19:09:16 -07:00
Leonardo de Moura
267225eca6
feat(library/init/io): unsafeIO returns Except IO.Error a instead of Option a
2019-07-17 19:09:16 -07:00
Leonardo de Moura
a438c90aa7
feat(library/init/lean): add namegenerator.lean
2019-07-17 19:09:16 -07:00
Leonardo de Moura
12ba2d353e
fix(stage0): missing file
2019-07-17 19:09:16 -07:00
Leonardo de Moura
f0899b381d
feat(library/init/lean/parser/module): add displayStx param
2019-07-17 19:09:15 -07:00
Leonardo de Moura
611635281b
chore(library/init/lean/parser/command): simple open command syntax
2019-07-17 19:09:15 -07:00
Leonardo de Moura
18d47a2b74
chore(frontends/lean): remove allow_field_notation = false setting
...
This setting was used for the explicit notation `@`.
We should not need it.
2019-07-17 19:09:15 -07:00
Leonardo de Moura
d03e00de99
chore(frontends/lean/builtin_exprs): remove obsolete notation from old parser
2019-07-17 19:09:15 -07:00
Leonardo de Moura
4e572b5e05
refactor(library/init/lean/scopes): move ScopeManager to separate file
2019-07-17 19:09:15 -07:00
Leonardo de Moura
40943f84f3
chore(tests): fix tests
2019-07-17 10:46:35 -07:00
Leonardo de Moura
a3c0e2bb36
chore(frontends/lean/builtin_exprs): ensure old let notation is not accepted
2019-07-17 08:26:42 -07:00
Leonardo de Moura
5489e23758
fix(library/init/lean/parser/parser): apply workaround for performance issue created by equation compiler
2019-07-16 16:13:58 -07:00
Leonardo de Moura
63f03a0303
chore(library/init/lean/parser/parser): remove unnecessary variable
2019-07-16 14:39:46 -07:00
Leonardo de Moura
912b7551d2
chore(library/init/lean/parser/module): interrupt test parser at #exit
2019-07-16 14:15:40 -07:00
Leonardo de Moura
69ab85de14
feat(library/init/lean/parser/command): add #exit command
2019-07-16 14:15:27 -07:00
Leonardo de Moura
3169a5f0d1
chore(library/init/lean/parser/module): display parsing time in test parser
2019-07-16 13:49:10 -07:00
Leonardo de Moura
310faa18c1
chore(tests/compiler/termparsertest1): fix test
2019-07-16 13:40:02 -07:00
Leonardo de Moura
ab27e1c7be
feat(library/init/lean/parser/parser): change many p behavior
...
We should not ingore an error in `p` if error position > initial position
2019-07-16 13:32:42 -07:00
Leonardo de Moura
e59edb27cd
feat(library/init/lean/parser/term): allow type annotation after pattern
2019-07-16 13:21:02 -07:00
Leonardo de Moura
86d7904ea7
chore(library/init/data/nat/basic): avoid empty set of equations
2019-07-16 13:13:04 -07:00
Leonardo de Moura
a52f67cea8
chore(library/init/lean/parser/parser): missing space
2019-07-16 13:10:07 -07:00
Leonardo de Moura
8a11c8509e
fix(library/init/lean/parser/command): open <id>+
2019-07-16 13:09:45 -07:00
Leonardo de Moura
5d077ad592
feat(library/init/lean/parser/term): add andM and orM notation
2019-07-16 10:56:44 -07:00
Leonardo de Moura
70066eaea7
chore(library/init/wf): add parentheses
2019-07-16 10:53:00 -07:00
Leonardo de Moura
6f31f6a38f
fix(library/init/lean/parser/parser): typo at quotedCharFn
2019-07-16 10:48:28 -07:00
Leonardo de Moura
0dcdc2c198
feat(library/init/lean/parser/term): add support for "named" patterns n@(x :: s)
...
@kha, the implementation is a little bit hackish. It is whitespace
sensitive to avoid `f @g`, an application with argument `@g` to be
parsed as a named pattern.
Here are other approaches I have considered:
1- In the `namedPattern`, we add a guard that ensures the pattern
is *not* an identifier. Thus, `f @g` would not be considered a valid
`namedPattern`. Drawback: we would always try to parse it as a
namedPattern first, fail, and then try as an application.
2- Enforce whitespace before application arguments. Drawback: `f(a+b)`
would not be a valid application anymore.
2019-07-16 10:09:01 -07:00
Leonardo de Moura
260ea04add
fix(library/init/lean/parser/parser): typo startPart ==> startPos
2019-07-16 09:36:44 -07:00
Leonardo de Moura
0c4708ad28
chore(stage0): update
2019-07-16 09:07:39 -07:00
Leonardo de Moura
b157b2c9e9
feat(library/init/lean/parser): improve error messages
2019-07-16 08:16:03 -07:00