Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when defining certain rules #1170

Closed
dpsanders opened this issue Jun 16, 2024 · 1 comment
Closed

Errors when defining certain rules #1170

dpsanders opened this issue Jun 16, 2024 · 1 comment

Comments

@dpsanders
Copy link

julia> @rule ~x ^ ~y => 0
ERROR: LoadError: Syntax for specifying a slot is ~x::$predicate, where predicate is a boolean function
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] makeslot(s::Expr, keys::Vector{Symbol})
   @ SymbolicUtils ~/.julia/packages/SymbolicUtils/qyMYa/src/rule.jl:49
 [3] makepattern(expr::Expr, keys::Vector{Symbol})
   @ SymbolicUtils ~/.julia/packages/SymbolicUtils/qyMYa/src/rule.jl:67
 [4] var"@rule"(__source__::LineNumberNode, __module__::Module, expr::Any)
   @ SymbolicUtils ~/.julia/packages/SymbolicUtils/qyMYa/src/rule.jl:306
in expression starting at REPL[4]:1
@dpsanders
Copy link
Author

Ah seems like that needs to be

julia> @rule (~x) ^ (~y) => 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant