-
-
Save Ringoxue/9bf973cbb783613dc9850356327328ec to your computer and use it in GitHub Desktop.
generate dot code that can generates a graph of an abstract julia type
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
function draw_dep(T::Type) | |
_draw(T::ANY) = for t in subtypes(T) | |
println(g, """ "$T" -> "$t" """) | |
_draw(t) | |
end | |
g = IOBuffer() | |
println(g, "digraph dep {") | |
_draw(T) | |
println(g, "}") | |
g |> takebuf_string | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment