AlgebraicJulia / GATlab.jl

GATlab: a computer algebra system based on generalized algebraic theories (GATs)
https://algebraicjulia.github.io/GATlab.jl/
MIT License
24 stars 2 forks source link

Wrapper functions around GAT models #30

Closed olynch closed 1 year ago

olynch commented 1 year ago

We should have wrapper functions around GAT models, like compose, etc., which are exported from the module where categories are defined.

Note that these would not be the functions that you overload in order to define a model. Rather, these call ap, typarg, and checkvalidity with Val types of the appropriate level.

I.e.

compose(c::Model{ThCategory}, f, g) = ap(c, @getlvl(ThCategory.compose), f, g)

We also need @getlvl for this to work.