Created
September 4, 2024 08:44
-
-
Save mpickering/829e06d101b1dea92abc0d8cfc6fa573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import networkx as nx | |
g = nx.drawing.nx_agraph.read_dot("/home/matt/ghc-clean/deps-2.dot") | |
#g.remove_edge("GHC.Iface.Type", "GHC.Tc.Utils.TcType") | |
#g.remove_edge("GHC.Core.Type", "GHC.Tc.Utils.TcType") | |
#g.remove_edge("GHC.Types.Var", "GHC.Tc.Utils.TcType") | |
# FFI stuff checking DynFlags | |
#g.remove_edge("GHC.Tc.Utils.TcType", "GHC.Driver.Session") | |
# Because of TcLclEnv import | |
#g.remove_edge("GHC.Hs.Expr", "GHC.Tc.Types") | |
#g.add_edge | |
#g.add_node("GHC.Hs. | |
# isIrrefutableHsPat, move that to GHC.Rename.Expr | |
#g.remove_edge("GHC.Hs.Pat", "GHC.Driver.Session") | |
#g.remove_edge("GHC.Driver.Config.StgToJS", "GHC.StgToJS.Types") | |
#g.remove_edge("GHC.Tc.Utils.TcType", "GHC.Driver.Session") | |
#g.remove_edge("GHC.Hs.Pat", "GHC.Driver.Session") | |
#g.remove_edge("GHC.Tc.Types.Constraint", "GHC.Driver.Session") | |
#g.remove_edge("GHC.Tc.Errors.Hole.FitTypes", "GHC.Tc.Types") | |
#g.remove_edge("GHC.Data.IOEnv", "GHC.Driver.Session") | |
#g.remove_edge("GHC.Data.IOEnv", "GHC.Driver.Hooks") | |
#g.remove_edge("GHC.Tc.Errors.Types", "GHC.Unit.State") | |
#g.remove_edge("GHC.Iface.Errors.Types", "GHC.Unit.State") | |
#g.remove_edge("GHC.Unit.State", "GHC.Driver.Session") | |
#print(nx.shortest_path(g, "Language.Haskell.Syntax", "GHC.Core.Opt.OccurAnal")) | |
print(nx.shortest_path(g, "Language.Haskell.Syntax", "GHC.Core.Opt.Arity")) | |
#print(nx.shortest_path(g, "Language.Haskell.Syntax", "GHC.StgToJS")) | |
#print(nx.shortest_path(g, "GHC.Tc.Utils.TcType", "GHC.Driver.Session")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment