You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bottom type Union{} has some nice properties. For example, a DiscreteCategory{Ob} could be a model of ThCategory{Ob, Union{}}. However, GATlab tries to instantiate the method id(x::Union{}) = ... and the Julia compiler rejects this due to a breaking change in Julia 1.10 that has persisted in 1.11. In Julia 1.12 it might be addressed.
So this issue is just documenting an upstream problem rather than anything to be done in GATlab itself.
In practice, this just leads to definitions like DiscreteCategory{Ob, Hom} - we have to manually declare what the homs would be when creating a discrete category, which is cumbersome. Another solution is that we can use a type parameter: @instance ThCategory{Ob, T} where {T<:Union{}} (the compiler does not reject f(x::T) where {T<:Union{}}), though this results in a bunch of "T was declared but not used" warnings.
The text was updated successfully, but these errors were encountered:
The bottom type
Union{}
has some nice properties. For example, aDiscreteCategory{Ob}
could be a model ofThCategory{Ob, Union{}}
. However, GATlab tries to instantiate the methodid(x::Union{}) = ...
and the Julia compiler rejects this due to a breaking change in Julia 1.10 that has persisted in 1.11. In Julia 1.12 it might be addressed.So this issue is just documenting an upstream problem rather than anything to be done in GATlab itself.
In practice, this just leads to definitions like
DiscreteCategory{Ob, Hom}
- we have to manually declare what the homs would be when creating a discrete category, which is cumbersome. Another solution is that we can use a type parameter:@instance ThCategory{Ob, T} where {T<:Union{}}
(the compiler does not rejectf(x::T) where {T<:Union{}}
), though this results in a bunch of "T
was declared but not used" warnings.The text was updated successfully, but these errors were encountered: