diff options
author | Austin Seipp <austin@well-typed.com> | 2013-09-09 13:40:06 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-09-11 19:54:36 -0500 |
commit | 75a9664af1c4e6f87794b49a215adb235b20696d (patch) | |
tree | 1748f512a2bde8c58b1e9c34c22203b0b20541ca /mk | |
parent | b20cf4ecbf244f091f4084c11ae2350d248ce6ef (diff) | |
download | haskell-75a9664af1c4e6f87794b49a215adb235b20696d.tar.gz |
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@chalmers.se>
Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/validate-settings.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk index ba645a4190..8797bf9a73 100644 --- a/mk/validate-settings.mk +++ b/mk/validate-settings.mk @@ -32,6 +32,8 @@ SRC_HC_OPTS += $(WERROR) -Wall GhcStage1HcOpts += -fwarn-tabs GhcStage2HcOpts += -fwarn-tabs +GhcStage2HcOpts += -fno-warn-amp # Temporary sledgehammer until we sync upstream. + utils/hpc_dist-install_EXTRA_HC_OPTS += -fwarn-tabs ##################### @@ -44,6 +46,7 @@ GhcStage2HcOpts += -O -dcore-lint # running of the tests, and faster building of the utils to be installed GhcLibHcOpts += -O -dcore-lint +GhcLibHcOpts += -fno-warn-amp # Temporary sledgehammer until we sync upstream. # We define DefaultFastGhcLibWays in this style so that the value is # correct even if the user alters DYNAMIC_GHC_PROGRAMS. |