summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/Vta1.hs
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/typecheck/should_compile/Vta1.hs
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/typecheck/should_compile/Vta1.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/Vta1.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/tests/typecheck/should_compile/Vta1.hs b/testsuite/tests/typecheck/should_compile/Vta1.hs
index c3ba43de54..3498b7068b 100644
--- a/testsuite/tests/typecheck/should_compile/Vta1.hs
+++ b/testsuite/tests/typecheck/should_compile/Vta1.hs
@@ -5,6 +5,8 @@
module Vta1 where
+import Data.Kind (Type)
+
quad :: a -> b -> c -> d -> (a, b, c, d)
quad = (,,,)
@@ -58,9 +60,9 @@ pairnum = pair 3
e = (pair 3 :: forall a. Num a => forall b. b -> (a, b)) @Int @Bool True
h = pairnum @Int @Bool True
-data First (a :: * -> *) = F
+data First (a :: Type -> Type) = F
data Proxy (a :: k) = P -- This expands to P (kind variable) (type variable)
-data Three (a :: * -> k -> *) = T
+data Three (a :: Type -> k -> Type) = T
foo :: Proxy a -> Int
foo _ = 0
@@ -88,7 +90,7 @@ n = MkN show
boo = unMkN n @Bool
-boo2 :: forall (a :: * -> *) . Proxy a -> Bool
+boo2 :: forall (a :: Type -> Type) . Proxy a -> Bool
boo2 _ = False
base = boo2 P