summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ataxic_optimize.erl')
-rw-r--r--src/ataxic_optimize.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ataxic_optimize.erl b/src/ataxic_optimize.erl
index 39f45f7..cf6cd3a 100644
--- a/src/ataxic_optimize.erl
+++ b/src/ataxic_optimize.erl
@@ -303,6 +303,20 @@ aggressive (In = #value{ op = OP }) ->
In#value{ op = aggressive(OP) };
aggressive (In = #mseq{ ops = OPs }) ->
In#mseq{ ops = lists:map(fun aggressive/1, OPs) };
+aggressive (In = #letr{ bindings = Bs, op = OP }) ->
+ In#letr
+ {
+ op = aggressive(OP),
+ bindings =
+ lists:map(fun ({Key, Value}) -> {Key, aggressive(Value)} end, Bs)
+ };
+aggressive (In = #tern{ condition = C, then = T, else = E }) ->
+ In#tern
+ {
+ condition = aggressive(C),
+ then = aggressive(T),
+ else = aggressive(E)
+ };
aggressive (Other) ->
Other.