[commit: ghc] master: Canonicalise `MonadPlus` instances (dafeb51)

git at git.haskell.org git at git.haskell.org
Fri Jan 1 00:56:25 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dafeb51f266793a67e8ae18ae39a2e2e87943824/ghc

>---------------------------------------------------------------

commit dafeb51f266793a67e8ae18ae39a2e2e87943824
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Fri Jan 1 01:45:08 2016 +0100

    Canonicalise `MonadPlus` instances
    
    This refactoring exploits the fact that since AMP, in most cases,
    `instance MonadPlus` can be automatically derived from the respective
    `Alternative` instance.  This is because `MonadPlus`'s default method
    implementations are fully defined in terms of `Alternative(empty, (<>))`.


>---------------------------------------------------------------

dafeb51f266793a67e8ae18ae39a2e2e87943824
 compiler/prelude/PrelRules.hs                     | 10 ++++------
 compiler/simplCore/CoreMonad.hs                   | 14 +++++---------
 compiler/types/Unify.hs                           | 12 ++++--------
 compiler/utils/IOEnv.hs                           | 14 +++++---------
 compiler/utils/MonadUtils.hs                      |  6 ++++--
 libraries/base/Control/Arrow.hs                   |  4 +---
 libraries/base/Data/Semigroup.hs                  |  4 +---
 libraries/base/GHC/Conc/Sync.hs                   |  4 +---
 libraries/base/Text/ParserCombinators/ReadP.hs    | 12 ++++--------
 libraries/base/Text/ParserCombinators/ReadPrec.hs |  8 +++-----
 10 files changed, 32 insertions(+), 56 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc dafeb51f266793a67e8ae18ae39a2e2e87943824


More information about the ghc-commits mailing list