feat: include imports in header snap info tree
This commit is contained in:
parent
6d809e7cd1
commit
89bbaf514e
1 changed files with 12 additions and 3 deletions
|
|
@ -217,9 +217,18 @@ section Initialization
|
|||
let cmdState := Elab.Command.mkState headerEnv msgLog opts
|
||||
let cmdState := { cmdState with infoState := {
|
||||
enabled := true
|
||||
-- add dummy tree for invariant in `Snapshot.infoTree`
|
||||
-- TODO: maybe even fill with useful stuff
|
||||
trees := #[Elab.InfoTree.node (Elab.Info.ofCommandInfo { elaborator := `import, stx := headerStx }) #[].toPersistentArray].toPersistentArray
|
||||
trees := #[Elab.InfoTree.context ({
|
||||
env := headerEnv
|
||||
fileMap := m.text
|
||||
}) (Elab.InfoTree.node
|
||||
(Elab.Info.ofCommandInfo { elaborator := `import, stx := headerStx })
|
||||
(headerStx[1].getArgs.toList.map (fun importStx =>
|
||||
Elab.InfoTree.node (Elab.Info.ofCommandInfo {
|
||||
elaborator := Name.anonymous,
|
||||
stx := importStx
|
||||
}) #[].toPersistentArray
|
||||
)).toPersistentArray
|
||||
)].toPersistentArray
|
||||
}}
|
||||
let headerSnap := {
|
||||
beginPos := 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue