test: simple quotation terms
This commit is contained in:
parent
027b3921b3
commit
b70edfaa2d
2 changed files with 17 additions and 0 deletions
13
tests/lean/StxQuot.lean
Normal file
13
tests/lean/StxQuot.lean
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import Init.Lean
|
||||
|
||||
namespace Lean
|
||||
open Lean.Elab
|
||||
|
||||
def run : Unhygienic Syntax → String := toString ∘ Unhygienic.run
|
||||
|
||||
#eval run `(Nat.one)
|
||||
#eval run `(1 + 1)
|
||||
#eval run $ do a ← `(Nat.one); `(%%a)
|
||||
#eval run $ do a ← `(Nat.one); `(f %%(id a))
|
||||
|
||||
end Lean
|
||||
4
tests/lean/StxQuot.lean.expected.out
Normal file
4
tests/lean/StxQuot.lean.expected.out
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
"(Term.id `Nat.one (null))"
|
||||
"(Term.add (numLit \"1\") \"+\" (numLit \"1\"))"
|
||||
"(Term.id `Nat.one (null))"
|
||||
"(Term.app (Term.id `f (null)) (Term.id `Nat.one (null)))"
|
||||
Loading…
Add table
Reference in a new issue