Skip to content

Commit

Permalink
migrate -> migrate_theory
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Brown authored and olynch committed Nov 13, 2023
1 parent 714c90a commit 345cc44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/models/ModelInterface.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ModelInterface

export Model, implements, TypeCheckFail, SignatureMismatchError,
@model, @instance, @withmodel, @fail, migrate
@model, @instance, @withmodel, @fail, migrate_theory

using ...Syntax
using ...Util.MetaUtils
Expand Down Expand Up @@ -780,6 +780,6 @@ function to_call_accessor(t::AlgTerm, x::Symbol, mod::Module)
Expr(:call, Expr(:ref, :($mod.$(nameof(headof(b)))), :(model.model)), rest)
end

migrate(theorymap::Module, m::Model) = theorymap.Migrator(m)
migrate_theory(theorymap::Module, m::Model) = theorymap.Migrator(m)

end # module
6 changes: 3 additions & 3 deletions src/stdlib/derivedmodels/DerivedModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ using ...StdTheoryMaps
using ...StdModels

# Given a model of a category C, we can derive a model of Cᵒᵖ.
OpFinSetC = migrate(OpCat, FinSetC())
OpFinSetC = migrate_theory(OpCat, FinSetC())

# Interpret `e` as `0` and `⋅` as `+`.
IntMonoid = migrate(NatPlusMonoid, IntNatPlus())
IntMonoid = migrate_theory(NatPlusMonoid, IntNatPlus())

# Interpret `id` as reflexivity and `compose` as transitivity.
IntPreorderCat = migrate(PreorderCat, IntPreorder())
IntPreorderCat = migrate_theory(PreorderCat, IntPreorder())

end # module

0 comments on commit 345cc44

Please sign in to comment.