Simplify goal bookkeeping mechanism #10

Merged
aniva merged 5 commits from tactic/book into dev 2023-08-30 19:18:37 -07:00
1 changed files with 7 additions and 3 deletions
Showing only changes of commit acfd4e8288 - Show all commits

View File

@ -83,16 +83,20 @@ def serialize_sort_level_ast (level: Level): String :=
let u_str := match u with let u_str := match u with
| .zero => "0" | .zero => "0"
| .succ _ => panic! "getLevelOffset should not return .succ" | .succ _ => panic! "getLevelOffset should not return .succ"
| .max v w | .imax v w => | .max v w =>
let v := serialize_sort_level_ast v let v := serialize_sort_level_ast v
let w := serialize_sort_level_ast w let w := serialize_sort_level_ast w
s!"(max {v} {w})" s!"(:max {v} {w})"
| .imax v w =>
let v := serialize_sort_level_ast v
let w := serialize_sort_level_ast w
s!"(:imax {v} {w})"
| .param name => | .param name =>
let name := name_to_ast name let name := name_to_ast name
s!"{name}" s!"{name}"
| .mvar id => | .mvar id =>
let name := name_to_ast id.name let name := name_to_ast id.name
s!"(:mvar {name})" s!"(:mv {name})"
match k, u with match k, u with
| 0, _ => u_str | 0, _ => u_str
| _, .zero => s!"{k}" | _, .zero => s!"{k}"