test: simple quotation terms

This commit is contained in:
Sebastian Ullrich 2019-12-11 14:44:39 +01:00 committed by Leonardo de Moura
parent 027b3921b3
commit b70edfaa2d
2 changed files with 17 additions and 0 deletions

13
tests/lean/StxQuot.lean Normal file
View 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

View 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)))"