Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Leonardo de Moura 52c7709cb3 fix: longestMatch at trailing parsers
Before this commit, if we execut `longestMatch [p1, p2]` in a
trailing parser where both `p1` and `p2` succeed, then an incorrect
syntax tree is generated by `p2`. The issue is that before executing
`p2`, the trailing stack is of the form
`#[..., left, syntax-by-p1]`
Then, the trailing parser `p2` incorrectly assumes that `syntax-by-p1`
was the "left" syntax node.
This commit fix this issue by storing the `left` node at the
`ParserContext` at `trailingLoop`

@Kha This bug was introduced when we unified leading and trailing
parsers. I think this is the simplest solution.
We can observe the bug before this commit by using
```
set_option syntaxMaxDepth 1000
set_option trace.Elab true
```
at `choiceMacroRules.lean`.

It is funny the correct result was produced even with the bug.
It was working because the `macro_rules` was matching the
buggy syntax with the nested `syntax-by-p1` there :)
2020-06-08 14:34:50 -07:00
.github chore: CI: check update-stage0 2020-05-19 11:31:36 -07:00
doc doc: reference correct default stage 2020-05-18 14:52:10 +02:00
images chore(CMakeLists.txt): move Lean logo to make sure we can test leanemacs without installing Lean 2015-01-31 17:38:49 -08:00
lean4-mode doc: further elaborate on elan and Emacs setup 2020-05-18 11:00:29 +02:00
nix fix: Nix build 2020-05-18 14:38:27 +02:00
script chore: update-stage0 output should not depend on locale 2020-05-20 10:35:43 +02:00
src fix: longestMatch at trailing parsers 2020-06-08 14:34:50 -07:00
stage0 chore: update stage0 2020-06-03 18:11:42 -07:00
tests fix: interaction between errToSorry and observing. 2020-06-08 12:37:43 -07:00
tmp proto: checkpoint 2020-04-03 15:20:54 -07:00
.clang-format feat(library/vm/process): add basic process support 2017-03-28 18:08:06 -07:00
.codecov.yml fix(.codecov.yml): do not fail github ci if coverage drops by 0.01% 2017-06-25 10:35:02 +02:00
.gitattributes chore(.gitattributes): use union merge strategy for doc/changes.md 2017-12-11 12:49:10 +01:00
.gitignore chore: move bin/ and .oleans into build directory 2020-05-14 14:47:54 +02:00
CMakeLists.txt chore: install stage 0.5 by default 2020-05-18 14:38:23 +02:00
default.nix chore: update to LLVM 10 2020-04-13 12:18:56 +02:00
LICENSE Add LICENSE file 2013-07-15 18:55:48 -07:00
README.md chore(README): update 2019-04-24 11:40:46 -07:00
shell.nix chore: move bin/ and .oleans into build directory 2020-05-14 14:47:54 +02:00

We are currently developing Lean 4. Lean 3 is still the latest official release. This repository contains work in progress.

Important. Unless you are one of our collaborators

  • We strongly suggest you use Lean 3.
  • Pull requests are not welcome.
  • New issues are not welcome, and will be closed without any feedback.