Exist a type tree of all types?

Hello,
I’am new. Exist a picture with a type tree of all Julia types?

Well, the type tree is kind of huge and gets dynamically extended by packages etc. Instead of trying to find and expect a static image, why not explore (branches of) it interactively? E.g.

julia> using AbstractTrees

julia> AbstractTrees.children(t::Type) = subtypes(t)

julia> print_tree(Number)
Number
β”œβ”€ Complex
└─ Real
   β”œβ”€ AbstractFloat
   β”‚  β”œβ”€ BigFloat
   β”‚  β”œβ”€ Float16
   β”‚  β”œβ”€ Float32
   β”‚  └─ Float64
   β”œβ”€ AbstractIrrational
   β”‚  └─ Irrational
   β”œβ”€ Integer
   β”‚  β”œβ”€ Bool
   β”‚  β”œβ”€ Signed
   β”‚  β”‚  β”œβ”€ BigInt
   β”‚  β”‚  β”œβ”€ Int128
   β”‚  β”‚  β”œβ”€ Int16
   β”‚  β”‚  β”œβ”€ Int32
   β”‚  β”‚  β”œβ”€ Int64
   β”‚  β”‚  └─ Int8
   β”‚  └─ Unsigned
   β”‚     β”œβ”€ UInt128
   β”‚     β”œβ”€ UInt16
   β”‚     β”œβ”€ UInt32
   β”‚     β”œβ”€ UInt64
   β”‚     └─ UInt8
   └─ Rational
8 Likes

Another package for this is TypeTree.jl:

using TypeTree
println(join(tt(Real), ""))

Real
 β”œβ”€ AbstractFloat
 β”‚   β”œβ”€ BigFloat
 β”‚   β”œβ”€ Float16
 β”‚   β”œβ”€ Float32
 β”‚   └─ Float64
 β”œβ”€ AbstractIrrational
 β”‚   └─ Irrational
 β”œβ”€ Integer
 β”‚   β”œβ”€ Bool
 β”‚   β”œβ”€ Signed
 β”‚   β”‚   β”œβ”€ BigInt
 β”‚   β”‚   β”œβ”€ Int128
 β”‚   β”‚   β”œβ”€ Int16
 β”‚   β”‚   β”œβ”€ Int32
 β”‚   β”‚   β”œβ”€ Int64
 β”‚   β”‚   └─ Int8
 β”‚   └─ Unsigned
 β”‚       β”œβ”€ UInt128
 β”‚       β”œβ”€ UInt16
 β”‚       β”œβ”€ UInt32
 β”‚       β”œβ”€ UInt64
 β”‚       └─ UInt8
 └─ Rational
3 Likes
2 Likes

@cormullion, how on earth did you generate such a PDF β€œ2129.48 cm wide x 16.8 cm tall” ??? :slight_smile:

I just used the Graphviz default settings, so the more nodes, the bigger the page. I think the biggest PDF page you can have is 15,000,000 inches square, or 38,000,000 cm, so there’s plenty of room for even more types… :rofl:

4 Likes