
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.

Adding core-libraries, whose bailiwick this is. Simon From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] 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.

I could definitely see moving the code to comments.
Sent from my iPad
On Oct 29, 2014, at 4:45 AM, Simon Peyton Jones
Adding core-libraries, whose bailiwick this is.
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] 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.
-- You received this message because you are subscribed to the Google Groups "haskell-core-libraries" group. To unsubscribe from this group and stop receiving emails from it, send an email to haskell-core-libraries+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

On 29 Oct 2014, at 00:24, David Feuer wrote:
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.
I'm not completely certain, but I have a vague feeling that the Haskell Report appendices that define the standard libraries might be auto-generated (LaTeX/HTML/etc) from the base library sources, and might use these #ifdefs to get the right version of the code. Regards, Malcolm

Ack! That -is- a somewhat scary invisible backdoor dependency. :/
We ripped out a lot of unused and untestable ifdefs for other compilers from base a couple of years back, I'd be curious if this was already affected.
Any idea where the code for the report generation lies?
-Edward
On Oct 29, 2014, at 5:18 AM, Malcolm Wallace
On 29 Oct 2014, at 00:24, David Feuer wrote:
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.
I'm not completely certain, but I have a vague feeling that the Haskell Report appendices that define the standard libraries might be auto-generated (LaTeX/HTML/etc) from the base library sources, and might use these #ifdefs to get the right version of the code.
Regards, Malcolm _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (4)
-
David Feuer
-
Edward Kmett
-
Malcolm Wallace
-
Simon Peyton Jones