Skip to content

Commit

Permalink
fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Sep 2, 2024
1 parent c538a2b commit 3f133b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ImportGraph/Gexf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def isBlackListed {m} [Monad m] [MonadEnv m] (declName : Name) : m Bool := do
<||> isRec declName <||> isMatcher declName

/-- Get all declarations in the specified file. -/
def getNumberOfDeclsInFile (module : Name) : CoreM (NameSet) := do
def getDeclsInFile (module : Name) : CoreM NameSet := do
let env ← getEnv
match env.moduleIdxForModule? module with
| none => return {}
Expand All @@ -51,7 +51,7 @@ Metadata can be stored in forms of attributes, currently we record the following
-/
def Graph.toGexf (graph : NameMap (Array Name)) (module : Name) : CoreM String := do
let sizes : NameMap Nat ← graph.foldM (fun acc n _ => do
pure <| acc.insert n (← getNumberOfDeclsInFile n).size ) {}
pure <| acc.insert n (← getDeclsInFile n).size ) {}
-- graph.fold (fun acc _ i => i.foldl (fun acc₂ j => acc₂.insert j ((acc₂.findD j 0) + 1)) acc) {}

let nodes : String := graph.fold (fun acc n _ => acc ++ nodeTemplate n module (sizes.findD n 0)) ""
Expand Down

0 comments on commit 3f133b5

Please sign in to comment.