summaryrefslogtreecommitdiff
path: root/testsuite/tests/roles
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2018-10-15 13:52:12 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-15 19:24:16 -0400
commit165d3d5ddaecc7dbe7f5ac051834a7619463efb0 (patch)
tree6ae7967d95ddc071a6dda7e3307f4a16cbf2229f /testsuite/tests/roles
parent058c2813d882266309e8045af7a72eedecbf2dbb (diff)
downloadhaskell-165d3d5ddaecc7dbe7f5ac051834a7619463efb0.tar.gz
Enable -Wcompat=error in the testsuite
Enabling -Werror=compat in the testsuite allows us to easily see the impact that a new warning has on code. It also means that in the period between adding the warning and making the actual breaking change, all new test cases that are being added to the testsuite will be forwards-compatible. This is good because it will make the actual breaking change contain less irrelevant testsuite updates. Things that -Wcompat warns about are things that are going to break in the future, so we can be proactive and keep our testsuite forwards-compatible. This patch consists of two main changes: * Add `TEST_HC_OPTS += -Werror=compat` to the testsuite configuration. * Fix all broken test cases. Test Plan: Validate Reviewers: hvr, goldfire, bgamari, simonpj, RyanGlScott Reviewed By: goldfire, RyanGlScott Subscribers: rwbarton, carter GHC Trac Issues: #15278 Differential Revision: https://phabricator.haskell.org/D5200
Diffstat (limited to 'testsuite/tests/roles')
-rw-r--r--testsuite/tests/roles/should_compile/Roles1.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles1.hs b/testsuite/tests/roles/should_compile/Roles1.hs
index ca040c4353..8488665fc6 100644
--- a/testsuite/tests/roles/should_compile/Roles1.hs
+++ b/testsuite/tests/roles/should_compile/Roles1.hs
@@ -2,10 +2,12 @@
module Roles1 where
+import Data.Kind (Type)
+
data T1 a = K1 a
data T2 a = K2 a
data T3 (a :: k) = K3
-data T4 (a :: * -> *) b = K4 (a b)
+data T4 (a :: Type -> Type) b = K4 (a b)
data T5 a = K5 a
data T6 a = K6
@@ -15,4 +17,4 @@ type role T1 nominal
type role T2 representational
type role T3 phantom
type role T4 nominal _
-type role T5 _ \ No newline at end of file
+type role T5 _