Skip to content

Commit ddae828

Browse files
committed
Like this?
1 parent 54ace96 commit ddae828

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

Export.lean

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -286,21 +286,21 @@ partial def dumpConstant (c : Name) : M Unit := do
286286
("all", ← dumpNames val.all)
287287
])
288288
]
289-
| .quotInfo val =>
290-
-- Always dump full Quot package (also pulls in Eq)
291-
dumpConstant ``Quot
292-
dumpConstant ``Quot.mk
293-
dumpConstant ``Quot.lift
294-
dumpConstant ``Quot.ind
295-
dumpConstant ``Quot.sound
296-
dumpObj [
297-
("quot", .mkObj [
298-
("name", ← dumpName val.name),
299-
("levelParams", ← dumpUparams val.levelParams),
300-
("type", ← dumpExpr val.type),
301-
("kind", val.kind.toJson)
302-
])
303-
]
289+
| .quotInfo _ =>
290+
-- Always dump full Quot package in the sensible order
291+
dumpConstant ``Eq
292+
for c in [`Quot, ``Quot.lift, ``Quot.ind, ``Quot.sound] do
293+
let some (.quotInfo val) := (← read).env.find? c
294+
| panic! s!"Constant {c} not found in environment."
295+
modify fun st => { st with visitedConstants := st.visitedConstants.insert c }
296+
dumpObj [
297+
("quot", .mkObj [
298+
("name", ← dumpName val.name),
299+
("levelParams", ← dumpUparams val.levelParams),
300+
("type", ← dumpExpr val.type),
301+
("kind", val.kind.toJson)
302+
])
303+
]
304304
| .inductInfo baseIndVal => do
305305
let mut indVals := #[]
306306
let mut ctorVals := #[]

0 commit comments

Comments
 (0)