Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Export.lean
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,21 @@ partial def dumpConstant (c : Name) : M Unit := do
("all", ← dumpNames val.all)
])
]
| .quotInfo val =>
dumpDeps val.type
dumpObj [
("quot", .mkObj [
("name", ← dumpName val.name),
("levelParams", ← dumpUparams val.levelParams),
("type", ← dumpExpr val.type),
("kind", val.kind.toJson)
])
]
| .quotInfo _ =>
-- Always dump full Quot package in the sensible order
dumpConstant ``Eq
for c in [`Quot, ``Quot.mk, ``Quot.lift, ``Quot.ind] do
let some (.quotInfo val) := (← read).env.find? c
| panic! s!"Constant {c} not found in environment."
modify fun st => { st with visitedConstants := st.visitedConstants.insert c }
dumpObj [
("quot", .mkObj [
("name", ← dumpName val.name),
("levelParams", ← dumpUparams val.levelParams),
("type", ← dumpExpr val.type),
("kind", val.kind.toJson)
])
]
| .inductInfo baseIndVal => do
let mut indVals := #[]
let mut ctorVals := #[]
Expand Down
15 changes: 15 additions & 0 deletions Test.lean
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,22 @@ info: Eq
Eq.refl
Eq.rec
Quot
Quot.mk
Quot.lift
Quot.ind
-/
#guard_msgs in
#eval runParserTest do
dumpConstant `Quot.mk

/--
info: Eq
Eq.refl
Eq.rec
Quot
Quot.mk
Quot.lift
Quot.ind
-/
#guard_msgs in
#eval runParserTest do
Expand Down