Commit 3608f657 authored by Austin Seipp's avatar Austin Seipp

Deprecate the AMP warnings.

Now that we're in development mode, Applicative will soon be a
superclass of Monad in HEAD. So let's go ahead and deprecate the
-fno-warn-amp flag, remove the checks, and tweak a few tests
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 35d95a2a
......@@ -2604,7 +2604,8 @@ fWarningFlags = [
( "warn-warnings-deprecations", Opt_WarnWarningsDeprecations, nop ),
( "warn-deprecations", Opt_WarnWarningsDeprecations, nop ),
( "warn-deprecated-flags", Opt_WarnDeprecatedFlags, nop ),
( "warn-amp", Opt_WarnAMP, nop ),
( "warn-amp", Opt_WarnAMP,
\_ -> deprecate "it has no effect, and will be removed in GHC 7.12" ),
( "warn-orphans", Opt_WarnOrphans, nop ),
( "warn-identities", Opt_WarnIdentities, nop ),
( "warn-auto-orphans", Opt_WarnAutoOrphans, nop ),
......@@ -3026,7 +3027,6 @@ standardWarnings
= [ Opt_WarnOverlappingPatterns,
Opt_WarnWarningsDeprecations,
Opt_WarnDeprecatedFlags,
Opt_WarnAMP,
Opt_WarnTypedHoles,
Opt_WarnUnrecognisedPragmas,
Opt_WarnPointlessPragmas,
......
This diff is collapsed.
......@@ -1513,7 +1513,7 @@
<row>
<entry><option>-fwarn-amp</option></entry>
<entry>warn on definitions conflicting with the Applicative-Monad Proposal (AMP)</entry>
<entry><emphasis>(deprecated)</emphasis> warn on definitions conflicting with the Applicative-Monad Proposal (AMP)</entry>
<entry>dynamic</entry>
<entry><option>-fno-warn-amp</option></entry>
</row>
......
......@@ -9,7 +9,7 @@
instance Show Float -- Defined in ‘GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‘GHC.Real’
...plus 24 others
...plus 23 others
In a stmt of an interactive GHCi command: print it
<interactive>:8:1:
......@@ -22,5 +22,5 @@
instance Show Float -- Defined in ‘GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‘GHC.Real’
...plus 24 others
...plus 23 others
In a stmt of an interactive GHCi command: print it
......@@ -8,5 +8,5 @@
instance Show a => Show (List1 a) -- Defined at ../Test.hs:11:12
instance Show MyInt -- Defined at ../Test.hs:14:16
instance Show a => Show (MkT a) -- Defined at ../Test.hs:17:13
...plus 32 others
...plus 31 others
In a stmt of an interactive GHCi command: print it
......@@ -7,7 +7,7 @@ overloadedlistsfail01.hs:5:8:
instance Show Float -- Defined in ‘GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‘GHC.Real’
...plus 24 others
...plus 23 others
In the expression: print [1]
In an equation for ‘main’: main = print [1]
......
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 707
{-# OPTIONS_GHC -fno-warn-amp #-}
#endif
module T7145b ( A.Applicative(pure) ) where
import qualified Control.Applicative as A
......
T7145b.hs:10:1: Warning: Defined but not used: ‘pure’
T7145b.hs:7:1: Warning: Defined but not used: ‘pure’
......@@ -81,7 +81,8 @@ import Prelude hiding (
lines,
unlines,
words,
unwords
unwords,
join
)
import GHC.Exts
......
......@@ -7,7 +7,7 @@ holes2.hs:3:5: Warning:
instance Show Float -- Defined in ‘GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‘GHC.Real’
...plus 24 others
...plus 23 others
In the expression: show _
In an equation for ‘f’: f = show _
......
......@@ -56,8 +56,6 @@ T5095.hs:9:11:
instance Eq Ordering -- Defined in ‘GHC.Classes’
instance Eq GHC.Types.Word -- Defined in ‘GHC.Classes’
instance Eq a => Eq [a] -- Defined in ‘GHC.Classes’
instance Eq a => Eq (Control.Applicative.ZipList a)
-- Defined in ‘Control.Applicative’
instance Eq Integer -- Defined in ‘integer-gmp:GHC.Integer.Type’
(The choice depends on the instantiation of ‘a’
To pick the first instance above, use IncoherentInstances
......
......@@ -11,6 +11,6 @@ tcfail072.hs:23:13:
-- Defined in ‘GHC.Real’
instance Ord () -- Defined in ‘GHC.Classes’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’
...plus 23 others
...plus 22 others
In the expression: g A
In an equation for ‘g’: g (B _ _) = g A
......@@ -10,7 +10,7 @@ tcfail133.hs:68:7:
instance Show One -- Defined at tcfail133.hs:9:28
instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
-- Defined at tcfail133.hs:11:54
...plus 27 others
...plus 26 others
In the expression: show
In the expression: show $ add (One :@ Zero) (One :@ One)
In an equation for ‘foo’:
......
......@@ -10,7 +10,6 @@ tcfail181.hs:17:9:
instance Monad ((->) r) -- Defined in ‘GHC.Base’
instance Monad IO -- Defined in ‘GHC.Base’
instance Monad [] -- Defined in ‘GHC.Base’
...plus one other
In the expression: foo
In the expression: foo {bar = return True}
In an equation for ‘wog’: wog x = foo {bar = return True}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment