Joachim, thanks for the kind words but I'll be more careful not to waste people's time with bad bug reports like that.
To me, this seems like a bug in haddock. In
Data.List.html when I click on the source code for
init I go to
https://hackage.haskell.org/package/base-4.9.0.0/docs/src/GHC.List.html#init. This is the file I should go to for the source code for length also. Perhaps the problem is that the type of length in Data.List is
Foldable t => t a -> Int while init is
[a] -> [a] ? Should I file a haddock bug for the preceding?
There seems to be two minor related problems with the Users Guide (8.0.1.20161117) in section 10.32.6,List fusion. First, it should mention length as a good consumer. Secondly, it says: "If you want to write your own good consumers or producers, look at the Prelude definitions of the above functions to see how to do so." However if you go to
https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html and look at the source code for length you end up at
https://hackage.haskell.org/package/base-4.9.0.0/docs/src/Data.Foldable.html#length which is not a good consumer. I think the User's Guide should be changed to replace "Prelude" with "Data.List" in the quoted sentence. I'll file a doc bug on the User's Guide for these two issues. Also making a function implement list fusion is not always easy, e.g. the bug, length is not a good consumer, was open for six years before being fixed. Thus I will suggest in the bug that we delete "readily" and change "Prelude" to "Data.List" in "This list could readily be extended; if there are Prelude functions that you use a lot which are not included, please tell us."
Of course the preceding is not an excuse for giving space allocations of interpreted code when I reopened the bug but at that point I was convinced that there was a problem and wasn't critical of the "evidence" I was giving to support my claim.
Thanks