From 165d3d5ddaecc7dbe7f5ac051834a7619463efb0 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Mon, 15 Oct 2018 13:52:12 -0400 Subject: 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 --- testsuite/tests/polykinds/T9200.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testsuite/tests/polykinds/T9200.hs') diff --git a/testsuite/tests/polykinds/T9200.hs b/testsuite/tests/polykinds/T9200.hs index 740536a516..63c934c91b 100644 --- a/testsuite/tests/polykinds/T9200.hs +++ b/testsuite/tests/polykinds/T9200.hs @@ -2,6 +2,8 @@ TypeFamilies #-} module T9200 where + +import Data.Kind (Type) import Data.Proxy ------ @@ -18,7 +20,7 @@ class C () a => D a data T1 a b c = MkT1 (S True b c) data T2 p q r = MkT2 (S p 5 r) data T3 x y q = MkT3 (S x y '()) -type S (f :: k1) (g :: k2) (h :: k3) = ((T1 f g h, T2 f g h, T3 f g h) :: *) +type S (f :: k1) (g :: k2) (h :: k3) = ((T1 f g h, T2 f g h, T3 f g h) :: Type) ---------- -- cgit v1.2.1