fix: use ppTerm instead of formatTerm

This commit is contained in:
Gabriel Ebner 2022-12-20 16:51:02 -08:00
parent 54290d537b
commit 2606021304
2 changed files with 34 additions and 34 deletions

View file

@ -1,7 +1,7 @@
import Lean
open Lean PrettyPrinter
def fmt (stx : CoreM Syntax) : CoreM Format := stx >>= formatTerm
def fmt (stx : CoreM Syntax) : CoreM Format := do PrettyPrinter.ppTerm ⟨← stx⟩
#eval fmt `(if c then do t else e)
#eval fmt `(if c then do t; t else e)

View file

@ -1,38 +1,38 @@
if c.1 then do
t.1
else e.1
if c.1 then do
t.1;
t.1
else e.1
if c.1 then do
t.1
if c then do
t
else e
if c then do
t;
t
else e
if c then do
t
else do
e.1
if let x.1 := c.1 then do
t.1
e
if let x✝ := c✝ then do
t
else do
e.1
if c.1 then do
t.1
e
if c then do
t
else
if c.1 then do
t.1
if c then do
t
else do
e.1
e
do
if c.1 then
t.1
if c then
t
else
e.1
e
do
if c.1 then
t.1
else if c.1 then
t.1
if c then
t
else if c then
t
else
e.1
def foo.1 := by
e
def foo := by
· skip; skip
· skip; skip
skip
@ -56,9 +56,9 @@ by try skip
by try skip
skip
skip
{ foo.1 := bar.1
bar.1 := foo.1 + bar.1 }
let x.1 :=
{ foo.1 := bar.1
bar.1 := foo.1 + bar.1 }
x.1
{ foo✝ := bar✝
bar✝ := foo✝ + bar✝ }
let x :=
{ foo✝ := bar✝
bar✝ := foo✝ + bar✝ }
x