diff --git a/Project.toml b/Project.toml index 10daeb9..900187c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AlgebraicRelations" uuid = "1c3ea84b-a956-4dfe-a2f4-485757f48f1d" authors = ["bosonbaas "] -version = "0.2.2" +version = "0.2.3" [deps] AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" @@ -13,7 +13,7 @@ LibPQ = "194296ae-ab2e-5f79-8cd4-7183a0a5a0d1" [compat] AlgebraicPetri = "0.6" AutoHashEquals = "0.2.0" -Catlab = "0.9, 0.10" +Catlab = "0.11" DataFrames = "0.21, 0.22" LibPQ = "1.4.0" julia = "1.0" diff --git a/src/functor.jl b/src/functor.jl index 3dc9f75..8295bf2 100644 --- a/src/functor.jl +++ b/src/functor.jl @@ -2,6 +2,7 @@ module Functors using Catlab using Catlab.Theories +using Catlab.Theories: attr using Catlab.Programs.RelationalPrograms using Catlab.CategoricalAlgebra using Catlab.CategoricalAlgebra.FinSets @@ -157,9 +158,9 @@ reorder_part!(acs::ACSet, type::Symbol, order::Array{Int, 1}) = function _reorder_part!(acs::ACSet{CD,AD,Ts,Idxed}, ::Val{ob}, order::Array{Int, 1}) where {CD,AD,Ts,Idxed,ob} - in_homs = filter(hom -> codom(CD, hom) == ob, CD.hom) - indexed_out_homs = filter(hom -> dom(CD, hom) == ob && hom ∈ Idxed, CD.hom) - indexed_attrs = filter(attr -> dom(AD, attr) == ob && attr ∈ Idxed, AD.attr) + in_homs = filter(c_hom -> codom(CD, c_hom) == ob, hom(CD)) + indexed_out_homs = filter(c_hom -> dom(CD, c_hom) == ob && c_hom ∈ Idxed, hom(CD)) + indexed_attrs = filter(c_attr -> dom(AD, c_attr) == ob && c_attr ∈ Idxed, attr(AD)) last_part = length(acs.tables[ob])