Open jpfairbanks opened 4 years ago
OK, that's pretty bad.
This error has gotten better, but still doesn't check the right thing
julia> @theory BiproductCategory{Ob, Hom} <: Epidemiology{Ob, Hom} begin
spontaneous(A::Ob, B::Ob)::Hom(A,B)
end
julia> @syntax FreeEpidemiology{ObExpr, HomExpr} begin
compose(f::Hom, g::Hom) = associate(new(f,g; strict=true))
end
ERROR: ArgumentError: invalid type for argument f in method definition for compose at REPL[9]:2
Stacktrace:
[1] top-level scope
@ REPL[9]:2
I just spent waay too long debugging a new syntax I made.
MWE:
Error:
This error did not point me at the problem at all. The correct syntax is:
I think the solution is for the macro
@syntax
to check that you gave it the name of a validTheory
before it continues to execute. The error should say something likeNo Theory or Signature was provided to the
@syntax` macro.