JuliaSymbolics / Symbolics.jl

Symbolic programming for the next generation of numerical software

Home Page:https://symbolics.juliasymbolics.org/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when defining certain rules

dpsanders opened this issue · comments

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

Ah seems like that needs to be

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