Skip to content

Commit

Permalink
COMPAT: Temporarily restore type parameters for acset transformations.
Browse files Browse the repository at this point in the history
  • Loading branch information
epatters authored and mehalter committed Mar 27, 2023
1 parent 949cdae commit 793f1f2
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/categorical_algebra/CSets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ acsets, loose morphisms are usually preferable. For more information about
limits and colimits in these categories, see [`TightACSetTransformation`](@ref)
and [`LooseACSetTransformation`](@ref).
"""
abstract type ACSetTransformation{Dom,Codom} end
abstract type ACSetTransformation{S,Comp,Dom,Codom} end
# FIXME: The first parameters are included for backwards compatibility and
# should be removed in a future release.

""" Tight transformation between attributed C-sets.
Expand All @@ -239,7 +241,8 @@ and are currently not supported.
For the distinction between tight and loose, see [`ACSetTranformation`](@ref).
"""
abstract type TightACSetTransformation{Dom,Codom} <: ACSetTransformation{Dom,Codom} end
abstract type TightACSetTransformation{S,Comp,Dom,Codom} <:
ACSetTransformation{S,Comp,Dom,Codom} end

""" Loose transformation between attributed C-sets.
Expand All @@ -264,14 +267,16 @@ colimit in C-Set.
For the distinction between tight and loose, see [`ACSetTranformation`](@ref).
"""
abstract type LooseACSetTransformation{Dom,Codom} <: ACSetTransformation{Dom,Codom} end
abstract type LooseACSetTransformation{S,Comp,Dom,Codom} <:
ACSetTransformation{S,Comp,Dom,Codom} end

components::ACSetTransformation) = α.components
force::ACSetTransformation) = map_components(force, α)

# Dynamic ACSet transformations

@struct_hash_equal struct DynamicTightACSetTransformation <: TightACSetTransformation{ACSet,ACSet}
@struct_hash_equal struct DynamicTightACSetTransformation <:
TightACSetTransformation{Nothing,NamedTuple,ACSet,ACSet}
components::NamedTuple
dom::ACSet
codom::ACSet
Expand All @@ -282,7 +287,8 @@ force(α::ACSetTransformation) = map_components(force, α)
end
end

@struct_hash_equal struct DynamicLooseACSetTransformation <: LooseACSetTransformation{ACSet,ACSet}
@struct_hash_equal struct DynamicLooseACSetTransformation <:
LooseACSetTransformation{Nothing,NamedTuple,ACSet,ACSet}
components::NamedTuple
type_components::NamedTuple
dom::ACSet
Expand All @@ -293,7 +299,7 @@ end

@struct_hash_equal struct StructTightACSetTransformation{
S <: TypeLevelSchema, Comp <: NamedTuple,
Dom <: StructACSet{S}, Codom <: StructACSet{S}} <: TightACSetTransformation{Dom,Codom}
Dom <: StructACSet{S}, Codom <: StructACSet{S}} <: TightACSetTransformation{S,Comp,Dom,Codom}
components::Comp
dom::Dom
codom::Codom
Expand Down Expand Up @@ -369,7 +375,7 @@ end

@struct_hash_equal struct StructLooseACSetTransformation{
S <: TypeLevelSchema, Comp <: NamedTuple, Dom <: StructACSet{S},
Codom <: StructACSet{S}, TypeComp <: NamedTuple} <: LooseACSetTransformation{Dom,Codom}
Codom <: StructACSet{S}, TypeComp <: NamedTuple} <: LooseACSetTransformation{S,Comp,Dom,Codom}
components::Comp
type_components::TypeComp
dom::Dom
Expand Down

0 comments on commit 793f1f2

Please sign in to comment.