Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Leonardo de Moura 6a90fbf855 test: String interpolation
@Kha I wrote this extended test using the new frontend. The new
frontend worked great. I only had a minor issue with `#exit`.
The example uses `let rec`, parsers, macros, lift-method notation, etc.
It implements the new parser `strInterpolant p` for string
interpolation. The parser `p` is used to process the elements inside
`{...}`. Then, I use this parser to implement the macro `toString!`.
Example: `toString! "1+2 = {1+2}"` produces `"1+2 = 3"`.
Even the new "lift-method" notation works inside the string interpolant.
```lean
def g (x : Nat) : StateRefT Nat IO Nat := do
modify (· + x);
get

def ex : StateRefT Nat IO Unit := do
IO.println $ toString! ">> hello {(<- g 1)}";
IO.println $ toString! ">> world {(<- g 1)}";
pure ()
```
2020-09-20 18:11:19 -07:00
.github chore: remove hanging stdlib bench test from CI 2020-08-26 11:34:43 +02:00
doc doc: wording 2020-08-25 16:12:19 +02:00
images
lean4-mode feat: admit and done 2020-09-15 10:46:40 -07:00
nix chore: update nixpkgs, changing back to LLVM 10 2020-07-08 12:14:49 +02:00
script chore: update CI 2020-06-10 21:30:38 +02:00
src chore: add quotedCharCoreFn 2020-09-20 17:05:47 -07:00
stage0 chore: update stage0 2020-09-20 09:17:12 -07:00
tests test: String interpolation 2020-09-20 18:11:19 -07:00
tmp feat: add caseValues tactic 2020-08-06 15:37:00 -07:00
.clang-format
.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: restore marking stage0/ as binary files, which we lost at some point 2020-08-14 11:12:13 +02:00
.gitignore chore: move bin/ and .oleans into build directory 2020-05-14 14:47:54 +02:00
CMakeLists.txt chore: add stage 1.5 (yes, really) 2020-08-12 09:15:59 -07:00
default.nix chore: add separate "Linux release" CI job using Nix channel with older glibc for compatibility 2020-06-10 21:30:38 +02:00
LICENSE
README.md chore(README): update 2019-04-24 11:40:46 -07:00
shell.nix chore: update temci 2020-07-21 18:30:22 +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.