Constant folding for ^ and ^^
#15842 will introduce (built-in /
PrelRules) rewriting rules for
stimes. We will be able to match these functions and their arguments, so we should be able to do constant folding on them, too.
While (IMHO) constant folding
stimes might be dangerous regarding laziness and heap usage,
c1 ^ c2 and
c1 ^^ c2 should be safely replaceable by their calculated values.
Write built-in rules in
PrelRules, that match
^^ very much like the rules in #15842 , but if both arguments are constants, let the rewritten expression be the result of the calculation.