From daec705b13e82b9d0f6da8ef29ce3bd93b166b6f Mon Sep 17 00:00:00 2001
From: Kris Brown <kris@topos.institute>
Date: Tue, 19 Sep 2023 11:01:47 -0700
Subject: [PATCH] fix namedtuple

---
 src/stdlib/models/Op.jl  | 2 +-
 test/stdlib/models/Op.jl | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/stdlib/models/Op.jl b/src/stdlib/models/Op.jl
index 6658edad..9c34013f 100644
--- a/src/stdlib/models/Op.jl
+++ b/src/stdlib/models/Op.jl
@@ -18,7 +18,7 @@ using .ThCategory
 
 rename(::Nothing, ::Dict{Symbol,Symbol}) = nothing
 rename(nt::NamedTuple, d::Dict{Symbol,Symbol}) = 
-  NamedTuple(Dict([get(d, k, k) => v for (k, v) in pairs(nt)]))
+  NamedTuple(get(d, k, k) => v for (k, v) in pairs(nt))
 
 
 @instance ThCategory{ObT, HomT} (;model::OpC{ObT, HomT, C}) where {ObT, HomT, C} begin
diff --git a/test/stdlib/models/Op.jl b/test/stdlib/models/Op.jl
index a18fa22d..c2a4b215 100644
--- a/test/stdlib/models/Op.jl
+++ b/test/stdlib/models/Op.jl
@@ -13,6 +13,7 @@ using .ThCategory
 
   @test id(2) == [1,2]
   @test compose([1,1,1,3,2], [5]) == [2]
+  @test compose([1,1,1,3,2], [5]; context=(;)) == [2]
   @test codom([5]) == 1
   @test dom([5]; context=(c=10,)) == 10
 end