How to understand Type

question

#1

I find Type is frequently used in some codes. However, no documentation is provided:

help?> Type
search: Type typeof TypeVar TypeName typemin typemax TypedSlot typejoin TypeError typeassert

  No documentation found.

  Core.Type is of type UnionAll.

  Summary:

  struct UnionAll <: Type{T}

  Fields:

  var  :: TypeVar
  body :: Any

So what it Type and what is it intended for?


#2

There is also the docs which you should search: https://docs.julialang.org/en/stable/manual/types/#man-singleton-types-1

But I do think that this should be rectified: you should file an issue that there is not inline doc for Type and whilst you’re at it also for DataType. Please reference the github issue in this thread.


#3

Here it is:


#4

Just out of curiosity: is it possible to reproduce the functionality of Type in julia myself, or is it a hack that cannot be easily implemented by users?