fix(frontend): Tomograph fix

This commit is contained in:
Leni Aniva 2025-07-11 16:24:30 -07:00
parent 58b52359e1
commit 752d13182d
Signed by: aniva
GPG Key ID: D5F96287843E8DFB
1 changed files with 2 additions and 2 deletions

View File

@ -14,14 +14,14 @@ def dissect (args : List String) : IO UInt32 := do
let fileName :: _args := args | fail s!"Must supply a file name" let fileName :: _args := args | fail s!"Must supply a file name"
let file ← IO.FS.readFile fileName let file ← IO.FS.readFile fileName
let (context, state) ← do Frontend.createContextStateFromFile file fileName (env? := .none) {} let (context, state) ← do Frontend.createContextStateFromFile file fileName (env? := .none) {}
let frontendM: Elab.Frontend.FrontendM _ := let frontendM: Frontend.FrontendM _ :=
Frontend.mapCompilationSteps λ step => do Frontend.mapCompilationSteps λ step => do
IO.println s!"🐈 {step.stx.getKind.toString}" IO.println s!"🐈 {step.stx.getKind.toString}"
for (tree, i) in step.trees.zipIdx do for (tree, i) in step.trees.zipIdx do
IO.println s!"🌲[{i}] {← tree.toString}" IO.println s!"🌲[{i}] {← tree.toString}"
for (msg, i) in step.msgs.zipIdx do for (msg, i) in step.msgs.zipIdx do
IO.println s!"🔈[{i}] {← msg.toString}" IO.println s!"🔈[{i}] {← msg.toString}"
let (_, _) ← frontendM.run context |>.run state let (_, _) ← frontendM.run {} |>.run context |>.run state
return 0 return 0
end Pantograph end Pantograph