diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2023-01-14 14:41:39 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-18 01:56:22 -0500 |
commit | e9c0537cfbf7b47c64f592f529e402358b66ca7f (patch) | |
tree | a1e9fe1b5dadf437f7b8bf5dada0d11e4c7d8283 /testsuite/tests/wcompat-warnings | |
parent | ee9b78aa17e1eb81b3c4aa6a5ce324de49530e92 (diff) | |
download | haskell-e9c0537cfbf7b47c64f592f529e402358b66ca7f.tar.gz |
Enable -Wstar-is-type by default (#22759)
Following the plan in GHC Proposal #143 "Remove the * kind syntax",
which states:
In the next release (or 3 years in), enable -fwarn-star-is-type by default.
The "next release" happens to be 9.6.1
I also moved the T21583 test case from should_fail to should_compile,
because the only reason it was failing was -Werror=compat in our test
suite configuration.
Diffstat (limited to 'testsuite/tests/wcompat-warnings')
-rw-r--r-- | testsuite/tests/wcompat-warnings/Template.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr | 12 |
2 files changed, 3 insertions, 15 deletions
diff --git a/testsuite/tests/wcompat-warnings/Template.hs b/testsuite/tests/wcompat-warnings/Template.hs index 798eafc787..2a9a11b0c4 100644 --- a/testsuite/tests/wcompat-warnings/Template.hs +++ b/testsuite/tests/wcompat-warnings/Template.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE KindSignatures #-} - module WCompatWarningsOnOff where import qualified Data.Semigroup as Semi @@ -15,7 +13,3 @@ instance Semi.Semigroup S where instance Monoid S where S a `mappend` S b = S (a+b) mempty = S 0 - --- -fwarn-star-is-type -b :: (Bool :: *) -b = True diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr index a24d18353d..aaf0772b41 100644 --- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr +++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr @@ -1,23 +1,17 @@ -Template.hs:7:1: warning: [-Wsemigroup (in -Wcompat)] +Template.hs:5:1: warning: [-Wsemigroup (in -Wcompat)] Local definition of ‘<>’ clashes with a future Prelude name. This will become an error in a future release. -Template.hs:13:3: warning: [-Wnoncanonical-monoid-instances (in -Wdefault, -Wcompat)] +Template.hs:11:3: warning: [-Wnoncanonical-monoid-instances (in -Wdefault, -Wcompat)] Noncanonical ‘(<>) = mappend’ definition detected in the instance declaration for ‘Semigroup S’. Move definition from ‘mappend’ to ‘(<>)’ See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid -Template.hs:16:3: warning: [-Wnoncanonical-monoid-instances (in -Wdefault, -Wcompat)] +Template.hs:14:3: warning: [-Wnoncanonical-monoid-instances (in -Wdefault, -Wcompat)] Noncanonical ‘mappend’ definition detected in the instance declaration for ‘Monoid S’. ‘mappend’ will eventually be removed in favour of ‘(<>)’ Either remove definition for ‘mappend’ (recommended) or define as ‘mappend = (<>)’ See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid - -Template.hs:20:15: warning: [GHC-39567] [-Wstar-is-type (in -Wall, -Wcompat)] - Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’ - relies on the StarIsType extension, which will become - deprecated in the future. - Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead. |