Leonardo de Moura
b2693962bd
chore(library/init/lean): export as C functions
2019-08-17 07:30:07 -07:00
Leonardo de Moura
d002e550bb
chore(library/init/lean): filename ==> fileName
2019-08-13 19:51:04 -07:00
Leonardo de Moura
b77fcc4a0f
feat(library/init/lean/parser/command): add #elab command
2019-08-13 19:48:23 -07:00
Leonardo de Moura
f2ca5db169
chore(library/init/lean/parser/term): remove support for Lean3 syntax
2019-08-13 15:20:47 -07:00
Leonardo de Moura
ad1a2b3251
feat(library/init/lean/elaborator/preterm): add toLevel
...
Convert `Syntax` into "pre" universe level term used in Lean3
2019-08-13 13:06:48 -07:00
Leonardo de Moura
9735b979eb
feat(library/init/lean/elaborator/command): add #preterm command for testing toPreTerm
2019-08-13 09:52:15 -07:00
Leonardo de Moura
3dad81daee
feat(library/init/lean/elaborator): add resolvename.lean
2019-08-11 15:37:37 -07:00
Leonardo de Moura
d00019f57e
chore(library/init): fix whitspaces before =>
2019-08-09 09:13:49 -07:00
Leonardo de Moura
4d913370a7
chore(library/init): eliminate whitespaces using another patch script
2019-08-09 09:01:39 -07:00
Sebastian Ullrich
3ed67138d5
chore(*): update equation syntax in files and old parser
...
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Leonardo de Moura
9937855d89
feat(library/init/lean/parser/transform): add removeParen
2019-08-08 20:35:00 -07:00
Leonardo de Moura
98b0167e27
chore(library/init/lean/parser/parser): fix typo
2019-08-08 20:34:33 -07:00
Leonardo de Moura
d8f295d980
feat(library/init/lean): helper functions for transforming Syntax objects
2019-08-08 20:11:57 -07:00
Leonardo de Moura
c6795996f6
feat(library/init/lean/parser/term): allow match syntax to be used in def
2019-08-08 18:53:51 -07:00
Leonardo de Moura
10a8822ac5
fix(library/init/lean/parser/module): use updateLeading
2019-08-08 10:45:15 -07:00
Leonardo de Moura
74c46d2b35
fix(library/init/lean/parser/parser): symbolNoWs was not creating an atom
2019-08-08 10:41:40 -07:00
Leonardo de Moura
6b0eb79d37
feat(library/init/lean/parser/module): add convenient parseFile function for writing syntax "patching" tools
2019-08-08 09:42:57 -07:00
Leonardo de Moura
73f96730bb
feat(library/init/lean,kernel): add KernelException, addDecl and compileDecl
...
This commit also refines the type of `addAndCompile`.
We also add `ElabException.kernel` constructor for kernel exceptions.
2019-08-07 17:15:40 -07:00
Leonardo de Moura
d2f169a211
chore(library/init/lean/parser/parser): remove unnecessary unsafe code
2019-08-02 14:32:47 -07:00
Leonardo de Moura
46f361daab
feat(library/init/lean/elaborator): add open command elaborator
2019-07-31 15:58:04 -07:00
Leonardo de Moura
cf8daf4b24
feat(library/init/lean/elaborator): process header
...
TODO:
- improve/fix `setSearchPath`
- add `IO.getEnv`
- add support for relative imports at `absolutizeModuleName`
2019-07-24 07:37:33 -07:00
Leonardo de Moura
c40cba66fb
fix(library/init/lean/parser/parser): use eraseDups when registering builting parsers
2019-07-22 18:19:47 -07:00
Leonardo de Moura
eb47746647
feat(library/init/lean/elaborator): namespace, section and end commands
2019-07-21 16:55:23 -07:00
Leonardo de Moura
fdbbdf68fc
refactor(library/init/lean/elaborator/basic): make sure ElabState does not depend on parser state
...
cc @kha
2019-07-19 17:07:39 -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
Leonardo de Moura
eb7b2b77fa
chore(library/init/lean): minor changes
2019-07-18 17:16:44 -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
73824790a3
feat(library/init/lean/parser/parser): store SyntaxNodeKinds
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
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
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
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
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
b157b2c9e9
feat(library/init/lean/parser): improve error messages
2019-07-16 08:16:03 -07:00
Leonardo de Moura
f206b30fd7
feat(library/init/lean/parser): add charLit
2019-07-16 07:22:09 -07:00
Leonardo de Moura
ee5ffb8ee2
fix(library/init/lean/parser/command): add partial modifier
2019-07-15 16:35:14 -07:00