lean2/tests/lean/coercion2.lean
Leonardo de Moura 8c956280d9 chore(frontends/lean): rename setoption and setopaque commands to set::option and set::opaque
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-06 11:41:03 -08:00

32 lines
631 B
Text

variable T : Type
variable R : Type
variable t2r : T -> R
coercion t2r
variable g : R -> R -> R
variable a : T
print g a a
variable b : R
print g a b
print g b a
set::option lean::pp::coercion true
print g a a
print g a b
print g b a
set::option lean::pp::coercion false
variable S : Type
variable s : S
variable r : S
variable h : S -> S -> S
infixl 10 ++ : g
infixl 10 ++ : h
set::option lean::pp::notation false
print a ++ b ++ a
print r ++ s ++ r
check a ++ b ++ a
check r ++ s ++ r
set::option lean::pp::coercion true
print a ++ b ++ a
print r ++ s ++ r
set::option lean::pp::notation true
print a ++ b ++ a
print r ++ s ++ r