[GHC] #8004: Applicative/Monad proposal related warnings (AMP phase 1)

GHC ghc-devs at haskell.org
Thu Sep 12 02:55:19 CEST 2013


#8004: Applicative/Monad proposal related warnings (AMP phase 1)
-------------------------------------+------------------------------------
        Reporter:  quchen            |            Owner:  quchen
            Type:  feature request   |           Status:  new
        Priority:  high              |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:75a9664af1c4e6f87794b49a215adb235b20696d/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="75a9664af1c4e6f87794b49a215adb235b20696d"
 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>
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8004#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list