Proposal: Add singleton function to Data.List module

Ryan Scott at
Sun Sep 8 12:01:30 UTC 2019

> Meanwhile, Ryan GL Scott managed to
> accumulate enough data to show that breakage this one combinator would
> introduce was pretty minor after all, so we're going to go ahead with
> adding singleton before the rest of this happens.

In case you're curious what this data looks like: I compiled GHC
8.6.5, but with the singleton function added to Data.List, and built a
decently large variety of libraries from Hackage to see what would
break. When I was done with this informal experiment, my
~/.cabal/store directory for this version of GHC had 523 entries,
which provides a loose upper bound on the number of libraries that
successfully built (there are some duplicate entries). You can view
these store entries at [1].

Of these ~500 or so libraries, there were a grant total of three that
did not build out of the box:

* blank-canvas-0.7
* ghc-lib-parser-
* pandoc-2.7.3

Of course, this experiment is not exhaustive—there are many other
libraries out there, and there is also lots of code that is not on
Hackage. Nevertheless, the overall percentage of libraries that broke
was surprisingly small, and certainly much smaller than my initial

Ryan S.

More information about the Libraries mailing list