Is USE_REPORT_PRELUDE still useful?

Simon Peyton Jones simonpj at
Wed Oct 29 08:45:43 UTC 2014

Adding  core-libraries, whose bailiwick this is.


From: ghc-devs [mailto:ghc-devs-bounces at] On Behalf Of David Feuer
Sent: 29 October 2014 00:24
To: ghc-devs
Subject: Is USE_REPORT_PRELUDE still useful?

A lot of code in GHC.List and perhaps elsewhere compiles differently depending on whether USE_REPORT_PRELUDE is defined. Not all code differing from the Prelude implementation. Furthermore, I don't know to what extent, if any, such code actually works these days. Some of it certainly was not usable for *years* because GHC.List did not import GHC.Num. Should we
1. Convert all those code blocks to comments?
2. Go through everything, check it to make sure it's written as in the Prelude or has an alternative block, and then actually set up all the infrastructure so that works?
3. Leave it alone?
My general inclination is to go to 1.

I don't *really* like option 3 for four reasons:
a. It leaves untouched code to rot
b. It forces us to run CPP on files that otherwise have no need for it.
c. It interrupts the flow of the code with stuff that *looks* like real code (and is highlighted as such) but is actually inactive.
d. It's not hard to accidentally move code into or out of the #ifdef blocks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list