Update expected profiling output for scc001
Link to oneShot from the User's Guide

thanks to Jan for nudging.
Make Foldable's foldr1 and foldl1 defaults lazier

Fixes #9742. Previously, `foldr1` as applied to a list-like
structure would be strict in the spine, and `foldl1` would
be strict in the spine of a snoc-list.

See also

 https://www.haskell.org/pipermail/libraries/2014-October/024035.html

Differential Revision: https://phabricator.haskell.org/D423
Further relax T1969’s max_bytes range
Add `Alternative` wrapper to Data.Monoid

Complete #9759. Use `coerce` to get nicer definitions of `Sum` and
`Product`; update documentation for `First` and `Last`.

Reviewed By: hvr

Differential Revision: https://phabricator.haskell.org/D422
Minor Haddock markup improvement to Data.Monoid

[skip ci]
Refactor Haddock comments in Data.Bits

This removes the redundant "Minimal complete definition"-block included
in the Haddock comment since Haddock renders the `MINIMAL`-pragma as
well (which has is moved to the start of `class` definition for better
readability of the source code)

Morever, the references to `testBitDefault`, `bitDefault`, and
`popCountDefault` have been moved to the respective methods' Haddock
strings for which they can be used.
Fix lost Haddock annotation for `class Monad m`

This was broken in d94de87252d0fe2ae97341d186b03a2fbe136b04 when `join`
was inserted between `Monad`'s Haddock string and the `class Monad m`
definition thereby breaking the association.
Tidy up pretty-printing of SrcLoc and SrcSpan
Improve pretty-printing of type variables

In particular, print a bit of debug info in debug-style and dump-style
Otherwise distinct type variables look the same
Some refactoring around endPass and debug dumping

I forget all the details, but I spent some time trying to
understand the current setup, and tried to simplify it a bit
Simplify the generation of superclass constraints in tcInstDecl2

The simplified function is tcSuperClasses;
no need for an implication constraint here
Add the unfolding and inline-pragma for DFuns in DsBinds, not TcInstDcls

This is a straight refactoring that puts the generation of unfolding
info in one place, which is a lot tidier
White space only
Fix reduceTyFamApp_maybe

This function previously would expand *data* families even when it was asked
for a *Nominal* coercion.  This patch fixes it, and adds comments.
Simplify the API for tcInstTyVars, and make it more consistent with other similar functions
Rename setRole_maybe to downgradeRole_maybe

This change is just for naming uniformity with the existing downgradeRole
Refactor skolemising, and newClsInst

This makes newClsInst (was mkInstance) look more like newFamInst, and simplifies
the plumbing of the overlap flag, and ensures that freshening (required by
the InstEnv stuff) happens in one place.

On the way I also tided up the rather ragged family of tcInstSkolTyVars and
friends.  The result at least has more uniform naming.
Refactor the treatment of lexically-scoped type variables for instance declarations

Previously the univerally-quantified variables of the DFun were also (bizarrely)
used as the lexically-scoped variables of the instance declaration.  So, for example,
the DFun's type could not be alpha-renamed.  This was an odd restriction, which has
bitten me several times.

This patch does the Right Thing, by adding an ib_tyvars field to the
InstBindings record, which captures the lexically scoped variables.
Easy, robust, nice.  (I think this record probably didn't exist originally,
hence the hack.)
Get the Untouchables level right in simplifyInfer

Previously we could get constraints in which the untouchables-level did not
strictly increase, which is one of the main invariants!

This patch also simplifies and modularises the tricky case of generalising
an inferred let-binding