Skip to content

Commit

Permalink
Merge pull request #871 from AlgebraicJulia/eliminateTupleBottom
Browse files Browse the repository at this point in the history
Avoid building a `Tuple{Union{}}`
  • Loading branch information
epatters authored Dec 7, 2023
2 parents c4c28af + 5a11e91 commit ea2cba8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/categorical_algebra/CSets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -897,13 +897,17 @@ function pack_limit(::Type{ACS}, diagram, Xs, limits; abstract_product=false,
alim = NamedTuple(Dict(map(attrtypes(S)) do at
T = attrtype_type(Y, at)
apx = VarSet{T}(nparts(Y, at))
at => Multispan(apx, map(enumerate(cone_objects(diagram))) do (i, X)
v = map(parts(Y,at)) do p
f, c, j = var_reference(Y, at, p)
X[legs(limits[c])[i](j), f]
at => begin
vfs = VarFunction{T}[]
for (i,X) in enumerate(cone_objects(diagram))
v = map(parts(Y,at)) do p
f, c, j = var_reference(Y, at, p)
X[legs(limits[c])[i](j), f]
end
push!(vfs,VarFunction{T}(v, FinSet(nparts(X, at))))
end
VarFunction{T}(v, FinSet(nparts(X, at)))
end)
Multispan(apx,vfs)
end
end))
else
alim = NamedTuple()
Expand Down

0 comments on commit ea2cba8

Please sign in to comment.