Put one-Shot info in the interface

Differential Revision: https://phabricator.haskell.org/D391
Add GHC.Prim.oneShot

to allow the programer to explictitly set the oneShot flag. This helps
with #7994 and will be used in left folds. Also see
https://ghc.haskell.org/trac/ghc/wiki/OneShot

This commit touches libraries/base/GHC/Event/Manager.hs (which used to
have a local definition of the name oneShot) to avoid a shadowing error.

Differential Revision: https://phabricator.haskell.org/D392
Use oneShot in the definition of foldl etc.

This increases the chance of good code after fusing a left fold. See
ticket #7994 and the new Note [Left folds via right fold]

Differential Revision: https://phabricator.haskell.org/D393
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