[commit: ghc] master: Implement the AMP warning (#8004) (75a9664)

git at git.haskell.org git at git.haskell.org
Thu Sep 12 02:55:26 CEST 2013


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

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

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

commit 75a9664af1c4e6f87794b49a215adb235b20696d
Author: Austin Seipp <austin at well-typed.com>
Date:   Mon Sep 9 13:40:06 2013 -0500

    Implement the AMP warning (#8004)
    
    This patch implements a warning when definitions conflict with the
    Applicative-Monad Proposal (AMP), described in #8004. Namely, this will
    cause a warning iff:
    
        * You have an instance of Monad, but not Applicative
        * You have an instance of MonadPlus, but not Alternative
        * You locally defined a function named join, <*>, or pure.
    
    In GHC 7.10, these warnings will actually be enforced with superclass
    constraints through changes in base, so programs will fail to compile
    then.
    
    This warning is enabled by default. Unfortunately, not all of
    our upstream libraries have accepted the appropriate patches. So we
    temporarily fix ./validate by ignoring the AMP warning.
    
    Dan Rosén made an initial implementation of this change, and the
    remaining work was finished off by David Luposchainsky. I finally made
    some minor refactorings.
    
    Authored-by: Dan Rosén <danr at chalmers.se>
    Authored-by: David Luposchainsky <dluposchainsky at gmail.com>
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

75a9664af1c4e6f87794b49a215adb235b20696d
 compiler/main/DynFlags.hs         |    3 +
 compiler/prelude/PrelNames.lhs    |   31 +++++++-
 compiler/typecheck/Inst.lhs       |    6 +-
 compiler/typecheck/TcRnDriver.lhs |  149 ++++++++++++++++++++++++++++++++++++-
 docs/users_guide/7.8.1-notes.xml  |   25 +++++++
 docs/users_guide/flags.xml        |    7 ++
 docs/users_guide/using.xml        |   19 +++++
 mk/validate-settings.mk           |    3 +
 8 files changed, 237 insertions(+), 6 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 75a9664af1c4e6f87794b49a215adb235b20696d



More information about the ghc-commits mailing list