1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

foldrWithKey.

🎩 @patrickt.
This commit is contained in:
Rob Rix 2019-08-06 12:12:11 -04:00
parent dd6d9a0209
commit 28404ae11e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -164,7 +164,7 @@ heapGraph vertex edge h = foldr (uncurry graph) G.empty (IntMap.toList h)
Bool _ -> G.empty
String _ -> G.empty
Closure _ _ _ env -> foldr (G.overlay . edge (Left Lexical)) G.empty env
Record frame -> foldr (G.overlay . uncurry (edge . Right)) G.empty (Map.toList frame)
Record frame -> Map.foldrWithKey (\ k -> G.overlay . edge (Right k)) G.empty frame
heapValueGraph :: Heap -> G.Graph Concrete
heapValueGraph h = heapGraph (const id) (const fromAddr) h