Commit graph

29801 commits

Author SHA1 Message Date
Leonardo de Moura
7b6caba457 feat: add `ident as a valid elaboration kind 2020-01-25 14:55:32 -08:00
Leonardo de Moura
6d5de9f965 feat: handle raw identifiers as binders in fun
@Kha I am adding this kind of feature to improve the user experience.
For example, the macro
```
syntax "[" ident "↦" term "]" : term
macro_rules
| `([$x ↦ $v]) => `(fun $x => $v)
```
is accepted and looks perfectly reasonable.
However, before this commit, we would get a nasty error when
elaborating
```lean
check [x ↦ x + 1]
```
2020-01-25 14:55:21 -08:00
Sebastian Ullrich
1bf63f18ec chore: update stage0 2020-01-25 16:42:16 +01:00
Sebastian Ullrich
2509b3913a Revert "feat: add std streams"
This reverts commit 7575a32035.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
0be2424910 Revert "feat: override standard streams"
This reverts commit bd87ea5d5e.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
b760692a26 Revert "fix: thread local storage of std streams"
This reverts commit 961861ceab.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
a4858bf9f9 Revert "feat: MonadIO now extends MonadExcept IO.Error"
This reverts commit c0a7495495.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
58313a050a Revert "fix: #eval redirection of stdout"
This reverts commit 123577126c.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
ad29568051 Revert "fix: redirect"
This reverts commit addbb8dd67.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
e82add884f Revert "fix: test files"
This reverts commit 95f951bdf2.
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
88fe0de284 fix: default LEAN_PATH for installed Lean 2020-01-25 15:58:06 +01:00
Sebastian Ullrich
5c0fa84af5 feat: barely implement do elaboration 2020-01-25 15:57:41 +01:00
Sebastian Ullrich
df3fc8c147 chore: fix nix-build by disabling ccache for now 2020-01-25 15:26:59 +01:00
Sebastian Ullrich
02c773bc70 refactor: further Quotation cleanup 2020-01-25 13:47:27 +01:00
Sebastian Ullrich
093518725c refactor: minor cleanups for standalone expander 2020-01-25 11:58:29 +01:00
Leonardo de Moura
850729ba1b chore: fix tests 2020-01-24 17:32:21 -08:00
Leonardo de Moura
26d8874607 chore: update stage0 2020-01-24 17:24:02 -08:00
Leonardo de Moura
aa045f3b07 feat: safer mkCIdentFrom
cc @Kha
2020-01-24 17:23:21 -08:00
Leonardo de Moura
8fe1c495eb chore: update stage0 2020-01-24 12:38:53 -08:00
Leonardo de Moura
364bb7bdf7 fix: proper Name literals
cc @kha
2020-01-24 12:38:15 -08:00
Leonardo de Moura
4425feaebb chore: fix tests 2020-01-23 16:08:52 -08:00
Simon Hudon
95f951bdf2 fix: test files 2020-01-23 16:07:29 -08:00
Leonardo de Moura
addbb8dd67 fix: redirect
@cipher1024 I modified your fix. It would produce memory leaks if the
code executed by #eval modifies the stdout.
Here is the problem.
- Your replaces the handler with some new handler `H` and stores the
  old handler `O` in a `flet`.
- Code is executed and replaces the stdout handler with `H'`. The `H`s RC is
  decremented and `H'`s RC is incremeneted. So far, so good.
- Now, the destructor of your `flet` is executed, and it replaces `H'`
  with `O`, but `H'` RC is not decremented.
2020-01-23 15:58:34 -08:00
Simon Hudon
123577126c fix: #eval redirection of stdout 2020-01-23 15:44:49 -08:00
Leonardo de Moura
35179809a2 feat: hide macro scopes encoding when displaying errors 2020-01-23 15:33:02 -08:00
Leonardo de Moura
3cb1d01130 chore: update stage0 2020-01-23 15:01:09 -08:00
Leonardo de Moura
060a68d73f feat: remove addMacroScope approximation 2020-01-23 14:59:31 -08:00
Leonardo de Moura
ed6cb007d0 refactor: ExtractMacroScopesResult => MacroScopesView, add MacroScopesView.review 2020-01-23 14:11:32 -08:00
Leonardo de Moura
7662548517 chore: update stage0 2020-01-23 13:06:34 -08:00
Leonardo de Moura
c309f1dccd chore: remove unnecessary field 2020-01-23 13:05:27 -08:00
Leonardo de Moura
b47caaa0a5 refactor: notation and macro commands are now just macros 2020-01-23 13:04:21 -08:00
Leonardo de Moura
0abf1f04a7 chore: update stage0 2020-01-23 12:54:45 -08:00
Leonardo de Moura
9359a6569a feat: add [builtinMacro] 2020-01-23 12:54:04 -08:00
Leonardo de Moura
954c69de35 feat: use macroscopes for creating fresh kinds 2020-01-23 12:38:31 -08:00
Leonardo de Moura
d99ef11447 fix: nested addMacroScope 2020-01-23 12:36:37 -08:00
Leonardo de Moura
09a482a2b4 chore: update stage0 2020-01-23 12:23:22 -08:00
Leonardo de Moura
e681bd71d9 feat: simplify MacroM 2020-01-23 12:22:33 -08:00
Leonardo de Moura
8e9b18396d chore: udpate stage0 2020-01-23 12:13:43 -08:00
Leonardo de Moura
0228f9c9b7 chore: remove addMacroScopeExt 2020-01-23 12:08:20 -08:00
Leonardo de Moura
0a59e53265 chore: update stage0 2020-01-23 12:03:20 -08:00
Leonardo de Moura
6fdcb1c192 chore: prepare to remove addMacroScopeExt 2020-01-23 12:02:45 -08:00
Leonardo de Moura
0c1c4ea9cc chore: update expected output 2020-01-23 11:52:03 -08:00
Leonardo de Moura
aef998af72 chore: update stage0 2020-01-23 11:47:07 -08:00
Leonardo de Moura
4ef8aa347a feat: missing case 2020-01-23 11:46:29 -08:00
Leonardo de Moura
981d4733f3 chore: update stage0 2020-01-23 11:33:36 -08:00
Leonardo de Moura
fab256d4cc feat: improve macroscope encoding 2020-01-23 11:33:35 -08:00
Leonardo de Moura
87d002bb43 feat: extend MacroM
It now has access to `mainModule` and a name generator.
2020-01-23 09:48:37 -08:00
Leonardo de Moura
98ee6e9734 refactor: move NameGenerator to LeanInit 2020-01-23 08:49:58 -08:00
Leonardo de Moura
670243400b chore: update stage0 2020-01-22 20:15:29 -08:00
Leonardo de Moura
67535441ad fix: macroTail issue
cc @Kha
2020-01-22 20:14:09 -08:00