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/th/T3920.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'testsuite/tests/th/T3920.hs') diff --git a/testsuite/tests/th/T3920.hs b/testsuite/tests/th/T3920.hs index d7ea28de5b..e5e9e17e69 100644 --- a/testsuite/tests/th/T3920.hs +++ b/testsuite/tests/th/T3920.hs @@ -1,16 +1,19 @@ {-# LANGUAGE EmptyDataDecls, TypeFamilies, TemplateHaskell #-} module Main where -import Language.Haskell.TH +import Language.Haskell.TH hiding (Type) +import Data.Kind (Type) -type family S :: (* -> (* -> * -> *)) -> (* -> *) -> * +type family S :: (Type -> (Type -> Type -> Type)) + -> (Type -> Type) -> Type $(return []) test :: String test = $(do test <- [d| - type family T :: (* -> (* -> * -> *)) -> (* -> *) -> * |] + type family T :: (Type -> (Type -> Type -> Type)) + -> (Type -> Type) -> Type |] blah <- reify ''S return (LitE (StringL (pprint test ++ "\n" ++ pprint blah)))) -- cgit v1.2.1