Missing Proxy instances, make U1 instance more Proxy-like
authorRyanGlScott <ryan.gl.scott@gmail.com>
Mon, 29 Feb 2016 11:28:18 +0000 (12:28 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 29 Feb 2016 12:42:02 +0000 (13:42 +0100)
commit171d95df24dc2d9d0c1a3af9e75f021438a7da50
tree0a587d60a22eed012b7a35f2a053a8017b70cdf2
parent46f3775c683faeb710c9dc22f360f39334947d73
Missing Proxy instances, make U1 instance more Proxy-like

This accomplishes three things:

* Adds missing `Alternative`, `MonadPlus`, and `MonadZip` instances for
  `Proxy`
* Adds a missing `MonadPlus` instance for `U1`
* Changes several existing `U1` instances to use lazy pattern-matching,
  exactly how `Proxy` does it (in case we ever replace `U1` with
  `Proxy`). This is technically a breaking change (albeit an extremely
  minor one).

Test Plan: ./validate

Reviewers: austin, ekmett, hvr, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1962

GHC Trac Issues: #11650
libraries/base/Control/Monad/Zip.hs
libraries/base/Data/Foldable.hs
libraries/base/Data/Proxy.hs
libraries/base/Data/Traversable.hs
libraries/base/GHC/Generics.hs
libraries/base/changelog.md