Comment out CONSTANT_FOLDED in GHC.Natural

Authored by christiaanb on Oct 26 2018, 9:51 AM.



Although these functions were marked as CONSTANT_FOLDED, they did
not have a corresponding builtinRule in PrelRules. The idea was
probably to add them eventually, but this hasn't manifested so

The plan is to eventually add builtin rules for these functions
over Natural, so as a reminder we simply comment out the
CONSTANT_FOLDED annotation instead of removing it completely.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
christiaanb created this revision.Oct 26 2018, 9:51 AM

Fix testsuite output for now inlined negateNatural worker

bgamari accepted this revision.Oct 28 2018, 10:28 AM

Looks good.

I have opened Trac #15821 to track the addition of constant folding rules.


Indeed we really should implement constant folding for Natural. The fact that GHC can't reduce this is pretty embarrassing.

This revision is now accepted and ready to land.Oct 28 2018, 10:28 AM
This revision was automatically updated to reflect the committed changes.