Skip to content

Commit 005d32d

Browse files
committed
add a default rules function
1 parent fae8c3e commit 005d32d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/simplify.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
##### Numeric simplification
22

3+
default_rules(::EmptyCtx) = SIMPLIFY_RULES
34
"""
45
simplify(x, [rules=SIMPLIFY_RULES]; fixpoint=true, applyall=true, recurse=true)
56
@@ -11,7 +12,7 @@ Applies them once if `fixpoint=false`.
1112
The `applyall` and `recurse` keywords are forwarded to the enclosed
1213
`RuleSet`.
1314
"""
14-
function simplify(x, ctx=EmptyCtx(); rules=SIMPLIFY_RULES, fixpoint=true, applyall=true, recurse=true)
15+
function simplify(x, ctx=EmptyCtx(); rules=default_rules(ctx), fixpoint=true, applyall=true, recurse=true)
1516
if fixpoint
1617
SymbolicUtils.fixpoint(rules, x, ctx; recurse=recurse, applyall=recurse)
1718
else

0 commit comments

Comments
 (0)