AlgebraicJulia / Catlab.jl

A framework for applied category theory in the Julia language
https://www.algebraicjulia.org
MIT License
614 stars 58 forks source link

Add debug flag to `is_natural` #733

Closed kris-brown closed 1 year ago

kris-brown commented 1 year ago

It can be very helpful when debugging to see why an ACSet transformation is unnatural. When the keyword debug is set to true, a list of violations is is returned. (This is type unstable, but is_natural shouldn't be used in a hot loop, anyways).

kris-brown commented 1 year ago

inspiration from https://github.com/AlgebraicJulia/Catlab.jl/pull/599

epatters commented 1 year ago

Not required for this PR, but if you have a spare moment it would be great to reimplement #599 along these lines since that PR has been stale for a while.