
11 Oct
2006
11 Oct
'06
7:43 a.m.
Hello Simon, Wednesday, October 11, 2006, 2:23:59 PM, you wrote:
The constant-folding rules for the primops are all in prelude/PrelRules.lhs in function primOpRules. Please add more rules. For example, I see that x +# 0 = x is not in there!
but GHC.Base contains {-# RULES "x# +# 0#" forall x#. x# +# 0# = x# "0# +# x#" forall x#. 0# +# x# = x# "x# -# 0#" forall x#. x# -# 0# = x# "x# -# x#" forall x#. x# -# x# = 0# "x# *# 0#" forall x#. x# *# 0# = 0# "0# *# x#" forall x#. 0# *# x# = 0# "x# *# 1#" forall x#. x# *# 1# = x# "1# *# x#" forall x#. 1# *# x# = x# #-} is this not enough? -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com