Right now, @op blocks are interpreted by adding aliases to the currently build scope, in an intermediate step. This means that @op blocks have to go after the things they are bound to, and before the aliases are used. This is not backwards compatible with Catlab, and is unintuitive.
There are several possible ways to fix this. One is by "saving" all the aliases, and then adding them to any definition which is aliased as soon as that definition is made. Another is by rethinking how we do aliasing. The former will probably be quicker to implement, while the latter may be necessary for other reasons later down the line.
Right now,
@op
blocks are interpreted by adding aliases to the currently build scope, in an intermediate step. This means that@op
blocks have to go after the things they are bound to, and before the aliases are used. This is not backwards compatible with Catlab, and is unintuitive.There are several possible ways to fix this. One is by "saving" all the aliases, and then adding them to any definition which is aliased as soon as that definition is made. Another is by rethinking how we do aliasing. The former will probably be quicker to implement, while the latter may be necessary for other reasons later down the line.