Skip to content

Commit

Permalink
fix: header-data.bmp
Browse files Browse the repository at this point in the history
  • Loading branch information
hargoniX committed Sep 14, 2023
1 parent f730795 commit f9b5a29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DocGen4/Output/ToJson.lean
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ structure JsonModule where
deriving FromJson, ToJson

structure JsonHeaderIndex where
headers : List (String × String) := []
declarations : List (String × JsonDeclaration) := []

structure JsonIndexedDeclarationInfo where
kind : String
Expand All @@ -51,7 +51,7 @@ structure JsonIndex where
instancesFor : HashMap String (RBTree String Ord.compare) := .empty

instance : ToJson JsonHeaderIndex where
toJson idx := Json.mkObj <| idx.headers.map (fun (k, v) => (k, toJson v))
toJson idx := Json.mkObj <| idx.declarations.map (fun (k, v) => (k, toJson v))

instance : ToJson JsonIndex where
toJson idx := Id.run do
Expand All @@ -70,7 +70,7 @@ instance : ToJson JsonIndex where
return finalJson

def JsonHeaderIndex.addModule (index : JsonHeaderIndex) (module : JsonModule) : JsonHeaderIndex :=
let merge idx decl := { idx with headers := (decl.info.name, decl.header) :: idx.headers }
let merge idx decl := { idx with declarations := (decl.info.name, decl) :: idx.declarations }
module.declarations.foldl merge index

def JsonIndex.addModule (index : JsonIndex) (module : JsonModule) : BaseHtmlM JsonIndex := do
Expand Down

0 comments on commit f9b5a29

Please sign in to comment.