diff options
Diffstat (limited to 'testsuite')
171 files changed, 703 insertions, 502 deletions
diff --git a/testsuite/tests/arrows/should_compile/arrowpat.hs b/testsuite/tests/arrows/should_compile/arrowpat.hs index 56b1117e9a..dda06cfedf 100644 --- a/testsuite/tests/arrows/should_compile/arrowpat.hs +++ b/testsuite/tests/arrows/should_compile/arrowpat.hs @@ -1,4 +1,5 @@ -{-# OPTIONS -XArrows #-} +{-# LANGUAGE Arrows #-} +{-# OPTIONS -fno-warn-redundant-constraints #-} -- Test for Trac #1662 diff --git a/testsuite/tests/codeGen/should_compile/T3286.hs b/testsuite/tests/codeGen/should_compile/T3286.hs index 0cc852db94..22c810dcd7 100644 --- a/testsuite/tests/codeGen/should_compile/T3286.hs +++ b/testsuite/tests/codeGen/should_compile/T3286.hs @@ -1,3 +1,4 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} module T3286 (train) where diff --git a/testsuite/tests/deriving/should_compile/T2856.hs b/testsuite/tests/deriving/should_compile/T2856.hs index c8f81a00bc..fc309585fe 100644 --- a/testsuite/tests/deriving/should_compile/T2856.hs +++ b/testsuite/tests/deriving/should_compile/T2856.hs @@ -1,3 +1,4 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleInstances #-} -- Test Trac #2856 diff --git a/testsuite/tests/deriving/should_compile/T4966.hs b/testsuite/tests/deriving/should_compile/T4966.hs index 363627a415..85245b73ff 100644 --- a/testsuite/tests/deriving/should_compile/T4966.hs +++ b/testsuite/tests/deriving/should_compile/T4966.hs @@ -1,3 +1,5 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} + {-# LANGUAGE DatatypeContexts #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/deriving/should_compile/T4966.stderr b/testsuite/tests/deriving/should_compile/T4966.stderr index dceeaa698f..765c69756d 100644 --- a/testsuite/tests/deriving/should_compile/T4966.stderr +++ b/testsuite/tests/deriving/should_compile/T4966.stderr @@ -1,8 +1,8 @@ -T4966.hs:1:14: Warning: +T4966.hs:3:14: Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -T4966.hs:33:30: Warning: +T4966.hs:35:30: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (TreeListObject a)’ diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.hs b/testsuite/tests/deriving/should_compile/deriving-1935.hs index 5b3bca0c77..8bccd58182 100644 --- a/testsuite/tests/deriving/should_compile/deriving-1935.hs +++ b/testsuite/tests/deriving/should_compile/deriving-1935.hs @@ -3,6 +3,8 @@ -- Trac #1935 -- See Note [Superclasses of derived instance] in TcDeriv +{-# OPTIONS -fno-warn-redundant-constraints #-} + module Foo where import Data.Data diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.stderr b/testsuite/tests/deriving/should_compile/deriving-1935.stderr index bf2c79cb7a..9901a367d7 100644 --- a/testsuite/tests/deriving/should_compile/deriving-1935.stderr +++ b/testsuite/tests/deriving/should_compile/deriving-1935.stderr @@ -1,15 +1,15 @@ -deriving-1935.hs:15:11: Warning: +deriving-1935.hs:17:11: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (T a)’ -deriving-1935.hs:18:11: Warning: +deriving-1935.hs:20:11: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (S a)’ -deriving-1935.hs:19:11: Warning: +deriving-1935.hs:21:11: Warning: No explicit implementation for either ‘compare’ or ‘<=’ In the instance declaration for ‘Ord (S a)’ diff --git a/testsuite/tests/deriving/should_compile/drv001.hs b/testsuite/tests/deriving/should_compile/drv001.hs index 694af6a50f..3afd394cc0 100644 --- a/testsuite/tests/deriving/should_compile/drv001.hs +++ b/testsuite/tests/deriving/should_compile/drv001.hs @@ -1,3 +1,5 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} + -- !!! canonical weird example for "deriving" module ShouldSucceed where diff --git a/testsuite/tests/deriving/should_compile/drv002.hs b/testsuite/tests/deriving/should_compile/drv002.hs index 15eb2d9ecc..9ccb7b7bb7 100644 --- a/testsuite/tests/deriving/should_compile/drv002.hs +++ b/testsuite/tests/deriving/should_compile/drv002.hs @@ -1,3 +1,5 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} + module ShouldSucceed where data Z a b diff --git a/testsuite/tests/deriving/should_compile/drv003.hs b/testsuite/tests/deriving/should_compile/drv003.hs index 0b8149ce8a..6fdd763f84 100644 --- a/testsuite/tests/deriving/should_compile/drv003.hs +++ b/testsuite/tests/deriving/should_compile/drv003.hs @@ -1,3 +1,5 @@ +{-# OPTIONS -fno-warn-redundant-constraints #-} + -- !!! This is the example given in TcDeriv -- module ShouldSucceed where diff --git a/testsuite/tests/deriving/should_compile/drv003.stderr b/testsuite/tests/deriving/should_compile/drv003.stderr index 6d9819fee8..ead606d28a 100644 --- a/testsuite/tests/deriving/should_compile/drv003.stderr +++ b/testsuite/tests/deriving/should_compile/drv003.stderr @@ -1,10 +1,10 @@ -drv003.hs:12:10: Warning: +drv003.hs:14:10: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (Foo a)’ -drv003.hs:15:10: Warning: +drv003.hs:17:10: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (Bar b)’ diff --git a/testsuite/tests/deriving/should_run/T9576.stderr b/testsuite/tests/deriving/should_run/T9576.stderr index 6f8bf7f4e7..954b2d9de3 100644 --- a/testsuite/tests/deriving/should_run/T9576.stderr +++ b/testsuite/tests/deriving/should_run/T9576.stderr @@ -5,7 +5,7 @@ T9576: T9576.hs:6:31: ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ In the expression: showParen ((a >= 11)) ((.) (showString "MkBar ") (showsPrec 11 b1)) - When typechecking the code for ‘showsPrec’ + When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv (deferred type error) diff --git a/testsuite/tests/gadt/Gadt17_help.hs b/testsuite/tests/gadt/Gadt17_help.hs index 30b57133d5..e3b8e3a918 100644 --- a/testsuite/tests/gadt/Gadt17_help.hs +++ b/testsuite/tests/gadt/Gadt17_help.hs @@ -1,5 +1,5 @@ {-# LANGUAGE GADTs #-} -{-# OPTIONS_GHC -O #-} +{-# OPTIONS_GHC -O -fno-warn-redundant-constraints #-} module Gadt17_help ( TernOp (..), applyTernOp diff --git a/testsuite/tests/ghci/scripts/T5045.hs b/testsuite/tests/ghci/scripts/T5045.hs index b5b850330d..084dc2fe48 100644 --- a/testsuite/tests/ghci/scripts/T5045.hs +++ b/testsuite/tests/ghci/scripts/T5045.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE Arrows, FunctionalDependencies, FlexibleContexts, MultiParamTypeClasses, RecordWildCards #-} diff --git a/testsuite/tests/ghci/scripts/T8357.hs b/testsuite/tests/ghci/scripts/T8357.hs index 29fe7a85bb..82a34afdc6 100644 --- a/testsuite/tests/ghci/scripts/T8357.hs +++ b/testsuite/tests/ghci/scripts/T8357.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} diff --git a/testsuite/tests/ghci/scripts/T8931.script b/testsuite/tests/ghci/scripts/T8931.script index 152747681c..b0c52d3b3a 100644 --- a/testsuite/tests/ghci/scripts/T8931.script +++ b/testsuite/tests/ghci/scripts/T8931.script @@ -1,3 +1,4 @@ +:set -fno-warn-redundant-constraints :m +Data.Typeable let {f :: Typeable a => (a->Bool) -> Bool; f _ = True} f (\x -> (x == 3)) diff --git a/testsuite/tests/ghci/scripts/ghci044.script b/testsuite/tests/ghci/scripts/ghci044.script index d6f12ada6e..d86557d317 100644 --- a/testsuite/tests/ghci/scripts/ghci044.script +++ b/testsuite/tests/ghci/scripts/ghci044.script @@ -1,3 +1,4 @@ +:set -fno-warn-redundant-constraints --Testing flexible and Overlapping instances class C a where { f :: a -> String; f _ = "Default" } instance C Int where { f _ = "Zeroth" } diff --git a/testsuite/tests/ghci/scripts/ghci044.stderr b/testsuite/tests/ghci/scripts/ghci044.stderr index 9bc8df9994..625696a8ba 100644 --- a/testsuite/tests/ghci/scripts/ghci044.stderr +++ b/testsuite/tests/ghci/scripts/ghci044.stderr @@ -1,8 +1,8 @@ -<interactive>:9:1: +<interactive>:10:1: Overlapping instances for C [Int] arising from a use of ‘f’ Matching instances: - instance C [Int] -- Defined at <interactive>:6:10 - instance C a => C [a] -- Defined at <interactive>:8:10 + instance C [Int] -- Defined at <interactive>:7:10 + instance C a => C [a] -- Defined at <interactive>:9:10 In the expression: f [4 :: Int] In an equation for ‘it’: it = f [4 :: Int] diff --git a/testsuite/tests/ghci/scripts/ghci047.script b/testsuite/tests/ghci/scripts/ghci047.script index 70cc5181d8..d1ceefd482 100644 --- a/testsuite/tests/ghci/scripts/ghci047.script +++ b/testsuite/tests/ghci/scripts/ghci047.script @@ -1,4 +1,5 @@ --Testing GADTs, type families as well as a ton of crazy type stuff +:set -fno-warn-redundant-constraints :set -XGADTs :set -XTypeFamilies :set -XFunctionalDependencies diff --git a/testsuite/tests/ghci/scripts/ghci047.stderr b/testsuite/tests/ghci/scripts/ghci047.stderr index dc8dfc9ecb..9428dbc1a9 100644 --- a/testsuite/tests/ghci/scripts/ghci047.stderr +++ b/testsuite/tests/ghci/scripts/ghci047.stderr @@ -1,5 +1,5 @@ -<interactive>:38:1: +<interactive>:39:1: Couldn't match type ‘HFalse’ with ‘HTrue’ Expected type: HTrue Actual type: Or HFalse HFalse @@ -7,7 +7,7 @@ In the expression: f $ Baz 'a' In an equation for ‘it’: it = f $ Baz 'a' -<interactive>:39:1: +<interactive>:40:1: Couldn't match type ‘HFalse’ with ‘HTrue’ Expected type: HTrue Actual type: Or HFalse HFalse diff --git a/testsuite/tests/haddock/haddock_examples/Test.hs b/testsuite/tests/haddock/haddock_examples/Test.hs index 8336cb543d..da149d0ac0 100644 --- a/testsuite/tests/haddock/haddock_examples/Test.hs +++ b/testsuite/tests/haddock/haddock_examples/Test.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} ----------------------------------------------------------------------------- -- | -- Module : Test diff --git a/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr b/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr index cde205a25d..25225797d4 100644 --- a/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr +++ b/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr @@ -186,10 +186,10 @@ m = undefined -Test.hs:32:9: Warning: ‘p’ is exported by ‘p’ and ‘R(..)’ +Test.hs:33:9: Warning: ‘p’ is exported by ‘p’ and ‘R(..)’ -Test.hs:32:12: Warning: ‘q’ is exported by ‘q’ and ‘R(..)’ +Test.hs:33:12: Warning: ‘q’ is exported by ‘q’ and ‘R(..)’ -Test.hs:32:15: Warning: ‘u’ is exported by ‘u’ and ‘R(..)’ +Test.hs:33:15: Warning: ‘u’ is exported by ‘u’ and ‘R(..)’ -Test.hs:38:9: Warning: ‘a’ is exported by ‘a’ and ‘C(a, b)’ +Test.hs:39:9: Warning: ‘a’ is exported by ‘a’ and ‘C(a, b)’ diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.hs b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.hs index e197a6b48f..4d1f407cd3 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.hs +++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.hs @@ -1,6 +1,8 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldCompile where -test :: (Eq a) => [a] -- ^ doc1 - -> [a] {-^ doc2 -} +test :: (Eq a) => [a] -- ^ doc1 + -> [a] {-^ doc2 -} -> [a] -- ^ doc3 test xs ys = xs diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.hs b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.hs index cc2d8bfae5..14d7a268ba 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.hs +++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.hs @@ -1,6 +1,8 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldCompile where -test :: (Eq a) => [a] -- ^ doc1 - -> forall b . [b] {-^ doc2 -} +test :: (Eq a) => [a] -- ^ doc1 + -> forall b . [b] {-^ doc2 -} -> [a] -- ^ doc3 test xs ys = xs diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.hs b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.hs index 1aa6e37d07..8e03bc2213 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.hs +++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.hs @@ -1,7 +1,9 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldCompile where -test :: [a] -- ^ doc1 - -> forall b. (Ord b) => [b] {-^ doc2 -} +test :: [a] -- ^ doc1 + -> forall b. (Ord b) => [b] {-^ doc2 -} -> forall c. (Num c) => [c] -- ^ doc3 -> [a] test xs ys zs = xs diff --git a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC026.hs b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC026.hs index cc2d8bfae5..14d7a268ba 100644 --- a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC026.hs +++ b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC026.hs @@ -1,6 +1,8 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldCompile where -test :: (Eq a) => [a] -- ^ doc1 - -> forall b . [b] {-^ doc2 -} +test :: (Eq a) => [a] -- ^ doc1 + -> forall b . [b] {-^ doc2 -} -> [a] -- ^ doc3 test xs ys = xs diff --git a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs index c22be2fb87..4d6a8c2339 100644 --- a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs +++ b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockC027.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldCompile where -- I bet this test is a mistake! From the layout it diff --git a/testsuite/tests/indexed-types/should_compile/Class2.hs b/testsuite/tests/indexed-types/should_compile/Class2.hs index f0d90f35f5..04da8d5949 100644 --- a/testsuite/tests/indexed-types/should_compile/Class2.hs +++ b/testsuite/tests/indexed-types/should_compile/Class2.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} module Class2 where diff --git a/testsuite/tests/indexed-types/should_compile/Gentle.hs b/testsuite/tests/indexed-types/should_compile/Gentle.hs index 7ceedfd098..5406493097 100644 --- a/testsuite/tests/indexed-types/should_compile/Gentle.hs +++ b/testsuite/tests/indexed-types/should_compile/Gentle.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-} diff --git a/testsuite/tests/indexed-types/should_compile/InstContextNorm.hs b/testsuite/tests/indexed-types/should_compile/InstContextNorm.hs index 58ff8f8c0a..87aecb0e01 100644 --- a/testsuite/tests/indexed-types/should_compile/InstContextNorm.hs +++ b/testsuite/tests/indexed-types/should_compile/InstContextNorm.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, FlexibleContexts #-} {-# LANGUAGE EmptyDataDecls, FlexibleInstances, UndecidableInstances #-} diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext.hs index e178e110a5..f3bf5cfb2d 100644 --- a/testsuite/tests/indexed-types/should_compile/InstEqContext.hs +++ b/testsuite/tests/indexed-types/should_compile/InstEqContext.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} module InstEqContext where diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs index c5d017a644..0140d3e74e 100644 --- a/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs +++ b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, EmptyDataDecls #-} module InstEqContext2 where diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext3.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext3.hs index 3f307f8941..032ef34bc1 100644 --- a/testsuite/tests/indexed-types/should_compile/InstEqContext3.hs +++ b/testsuite/tests/indexed-types/should_compile/InstEqContext3.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} module InstEqContext where diff --git a/testsuite/tests/indexed-types/should_compile/NonLinearLHS.hs b/testsuite/tests/indexed-types/should_compile/NonLinearLHS.hs index 26ea632a29..d500b324fe 100644 --- a/testsuite/tests/indexed-types/should_compile/NonLinearLHS.hs +++ b/testsuite/tests/indexed-types/should_compile/NonLinearLHS.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, EmptyDataDecls, FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances #-} diff --git a/testsuite/tests/indexed-types/should_compile/Rules1.hs b/testsuite/tests/indexed-types/should_compile/Rules1.hs index b936349475..afb8bc2ade 100644 --- a/testsuite/tests/indexed-types/should_compile/Rules1.hs +++ b/testsuite/tests/indexed-types/should_compile/Rules1.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} module Rules1 where diff --git a/testsuite/tests/indexed-types/should_compile/Simple24.hs b/testsuite/tests/indexed-types/should_compile/Simple24.hs index de33458bc7..fbca4aaadd 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple24.hs +++ b/testsuite/tests/indexed-types/should_compile/Simple24.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleContexts #-} module Simple24 where diff --git a/testsuite/tests/indexed-types/should_compile/T2448.hs b/testsuite/tests/indexed-types/should_compile/T2448.hs index 806df3ff4c..7393eb1e6b 100644 --- a/testsuite/tests/indexed-types/should_compile/T2448.hs +++ b/testsuite/tests/indexed-types/should_compile/T2448.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, UndecidableInstances #-} module T2448 where diff --git a/testsuite/tests/indexed-types/should_compile/T3023.hs b/testsuite/tests/indexed-types/should_compile/T3023.hs index 26966daed7..116e9c77c2 100644 --- a/testsuite/tests/indexed-types/should_compile/T3023.hs +++ b/testsuite/tests/indexed-types/should_compile/T3023.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# OPTIONS_GHC -fwarn-missing-signatures #-} +{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-} module Bug where diff --git a/testsuite/tests/indexed-types/should_compile/T3023.stderr b/testsuite/tests/indexed-types/should_compile/T3023.stderr index 68066bac91..81afa91f60 100644 --- a/testsuite/tests/indexed-types/should_compile/T3023.stderr +++ b/testsuite/tests/indexed-types/should_compile/T3023.stderr @@ -1,4 +1,3 @@ -T3023.hs:17:1: - Warning: Top-level binding with no type signature: - bar :: Bool -> Bool +T3023.hs:18:1: Warning: + Top-level binding with no type signature: bar :: Bool -> Bool diff --git a/testsuite/tests/indexed-types/should_compile/T3484.hs b/testsuite/tests/indexed-types/should_compile/T3484.hs index 4d1570915e..e558cbbe21 100644 --- a/testsuite/tests/indexed-types/should_compile/T3484.hs +++ b/testsuite/tests/indexed-types/should_compile/T3484.hs @@ -1,5 +1,6 @@ +{-# OPTIONS_GHC -Wall -fno-warn-redundant-constraints #-} {-# LANGUAGE GADTs, RankNTypes, TypeFamilies, FlexibleContexts, ScopedTypeVariables #-} -{-# OPTIONS_GHC -Wall #-} + module Absurd where data Z = Z diff --git a/testsuite/tests/indexed-types/should_compile/T4200.hs b/testsuite/tests/indexed-types/should_compile/T4200.hs index 0d0e23a419..feb91e8d8b 100644 --- a/testsuite/tests/indexed-types/should_compile/T4200.hs +++ b/testsuite/tests/indexed-types/should_compile/T4200.hs @@ -1,12 +1,13 @@ -{-# LANGUAGE TypeFamilies #-}
-
-module T4200 where
-
-class C a where
- type In a :: *
- op :: In a -> Int
-
--- Should be ok; no -XUndecidableInstances required
-instance (In c ~ Int) => C [c] where
- type In [c] = In c
- op x = 3
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE TypeFamilies #-} + +module T4200 where + +class C a where + type In a :: * + op :: In a -> Int + +-- Should be ok; no -XUndecidableInstances required +instance (In c ~ Int) => C [c] where + type In [c] = In c + op x = 3 diff --git a/testsuite/tests/indexed-types/should_compile/T4497.hs b/testsuite/tests/indexed-types/should_compile/T4497.hs index 57d3d48ca4..07702bedc3 100644 --- a/testsuite/tests/indexed-types/should_compile/T4497.hs +++ b/testsuite/tests/indexed-types/should_compile/T4497.hs @@ -1,15 +1,16 @@ -{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, TypeFamilies #-}
-
-module T4497 where
-
-norm2PropR a = twiddle (norm2 a) a
-
-twiddle :: Normed a => a -> a -> Double
-twiddle a b = undefined
-
-norm2 :: e -> RealOf e
-norm2 = undefined
-
-class (Num (RealOf t)) => Normed t
-
-type family RealOf x
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, TypeFamilies #-} + +module T4497 where + +norm2PropR a = twiddle (norm2 a) a + +twiddle :: Normed a => a -> a -> Double +twiddle a b = undefined + +norm2 :: e -> RealOf e +norm2 = undefined + +class (Num (RealOf t)) => Normed t + +type family RealOf x diff --git a/testsuite/tests/indexed-types/should_compile/T4981-V1.hs b/testsuite/tests/indexed-types/should_compile/T4981-V1.hs index 629028748a..47e3b1c87a 100644 --- a/testsuite/tests/indexed-types/should_compile/T4981-V1.hs +++ b/testsuite/tests/indexed-types/should_compile/T4981-V1.hs @@ -1,34 +1,36 @@ -{-# LANGUAGE CPP, TypeFamilies, FlexibleContexts #-}
-module Class ( cleverNamedResolve ) where
-
-data FL p = FL p
-
-class PatchInspect p where
-instance PatchInspect p => PatchInspect (FL p) where
-
-type family PrimOf p
-type instance PrimOf (FL p) = PrimOf p
-
-data WithName prim = WithName prim
-
-instance PatchInspect prim => PatchInspect (WithName prim) where
-
-class (PatchInspect (PrimOf p)) => Conflict p where
- resolveConflicts :: p -> PrimOf p
-
-instance Conflict p => Conflict (FL p) where
- resolveConflicts = undefined
-
-type family OnPrim p
-
-class FromPrims p where
-
-instance FromPrims (FL p) where
-
-joinPatches :: FromPrims p => p -> p
-joinPatches = id
-
-cleverNamedResolve :: (Conflict (OnPrim p)
- ,PrimOf (OnPrim p) ~ WithName (PrimOf p))
- => p -> FL (OnPrim p) -> WithName (PrimOf p)
-cleverNamedResolve x = resolveConflicts . joinPatches
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE CPP, TypeFamilies, FlexibleContexts #-} + +module Class ( cleverNamedResolve ) where + +data FL p = FL p + +class PatchInspect p where +instance PatchInspect p => PatchInspect (FL p) where + +type family PrimOf p +type instance PrimOf (FL p) = PrimOf p + +data WithName prim = WithName prim + +instance PatchInspect prim => PatchInspect (WithName prim) where + +class (PatchInspect (PrimOf p)) => Conflict p where + resolveConflicts :: p -> PrimOf p + +instance Conflict p => Conflict (FL p) where + resolveConflicts = undefined + +type family OnPrim p + +class FromPrims p where + +instance FromPrims (FL p) where + +joinPatches :: FromPrims p => p -> p +joinPatches = id + +cleverNamedResolve :: (Conflict (OnPrim p) + ,PrimOf (OnPrim p) ~ WithName (PrimOf p)) + => p -> FL (OnPrim p) -> WithName (PrimOf p) +cleverNamedResolve x = resolveConflicts . joinPatches diff --git a/testsuite/tests/indexed-types/should_compile/T4981-V2.hs b/testsuite/tests/indexed-types/should_compile/T4981-V2.hs index 716f161340..6b1d472cc6 100644 --- a/testsuite/tests/indexed-types/should_compile/T4981-V2.hs +++ b/testsuite/tests/indexed-types/should_compile/T4981-V2.hs @@ -1,31 +1,33 @@ -{-# LANGUAGE CPP, TypeFamilies, FlexibleContexts #-}
-module Class ( cleverNamedResolve ) where
-
-data FL p = FL p
-
-class PatchInspect p where
-instance PatchInspect p => PatchInspect (FL p) where
-
-type family PrimOf p
-type instance PrimOf (FL p) = PrimOf p
-
-data WithName prim = WithName prim
-
-instance PatchInspect prim => PatchInspect (WithName prim) where
-
-class (PatchInspect (PrimOf p)) => Conflict p where
- resolveConflicts :: p -> PrimOf p
-
-instance Conflict p => Conflict (FL p) where
- resolveConflicts = undefined
-
-type family OnPrim p
-
-joinPatches :: FL p -> FL p
-
-joinPatches = id
-
-cleverNamedResolve :: (Conflict (OnPrim p)
- ,PrimOf (OnPrim p) ~ WithName (PrimOf p))
- => p -> FL (OnPrim p) -> WithName (PrimOf p)
-cleverNamedResolve x = resolveConflicts . joinPatches
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE CPP, TypeFamilies, FlexibleContexts #-} + +module Class ( cleverNamedResolve ) where + +data FL p = FL p + +class PatchInspect p where +instance PatchInspect p => PatchInspect (FL p) where + +type family PrimOf p +type instance PrimOf (FL p) = PrimOf p + +data WithName prim = WithName prim + +instance PatchInspect prim => PatchInspect (WithName prim) where + +class (PatchInspect (PrimOf p)) => Conflict p where + resolveConflicts :: p -> PrimOf p + +instance Conflict p => Conflict (FL p) where + resolveConflicts = undefined + +type family OnPrim p + +joinPatches :: FL p -> FL p + +joinPatches = id + +cleverNamedResolve :: (Conflict (OnPrim p) + ,PrimOf (OnPrim p) ~ WithName (PrimOf p)) + => p -> FL (OnPrim p) -> WithName (PrimOf p) +cleverNamedResolve x = resolveConflicts . joinPatches diff --git a/testsuite/tests/indexed-types/should_compile/T4981-V3.hs b/testsuite/tests/indexed-types/should_compile/T4981-V3.hs index e6bcd471d9..e0cd7ed8e5 100644 --- a/testsuite/tests/indexed-types/should_compile/T4981-V3.hs +++ b/testsuite/tests/indexed-types/should_compile/T4981-V3.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE CPP, TypeFamilies, FlexibleContexts #-} + module Class ( cleverNamedResolve ) where data FL p = FL p diff --git a/testsuite/tests/indexed-types/should_compile/T5002.hs b/testsuite/tests/indexed-types/should_compile/T5002.hs index cfc82d559e..390c6ae703 100644 --- a/testsuite/tests/indexed-types/should_compile/T5002.hs +++ b/testsuite/tests/indexed-types/should_compile/T5002.hs @@ -1,29 +1,30 @@ -{-# LANGUAGE TypeFamilies, FlexibleInstances, UndecidableInstances, FlexibleContexts #-}
-
-class A a
-class B a where b :: a -> ()
-instance A a => B a where b = undefined
-
-newtype Y a = Y (a -> ())
-
-okIn701 :: B a => Y a
-okIn701 = wrap $ const () . b
-
-okIn702 :: B a => Y a
-okIn702 = wrap $ b
-
-okInBoth :: B a => Y a
-okInBoth = Y $ const () . b
-
-class Wrapper a where
- type Wrapped a
- wrap :: Wrapped a -> a
-instance Wrapper (Y a) where
- type Wrapped (Y a) = a -> ()
- wrap = Y
-
-fromTicket3018 :: Eq [a] => a -> ()
-fromTicket3018 x = let {g :: Int -> Int; g = [x]==[x] `seq` id} in ()
-
-main = undefined
-
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE TypeFamilies, FlexibleInstances, UndecidableInstances, FlexibleContexts #-} + +class A a +class B a where b :: a -> () +instance A a => B a where b = undefined + +newtype Y a = Y (a -> ()) + +okIn701 :: B a => Y a +okIn701 = wrap $ const () . b + +okIn702 :: B a => Y a +okIn702 = wrap $ b + +okInBoth :: B a => Y a +okInBoth = Y $ const () . b + +class Wrapper a where + type Wrapped a + wrap :: Wrapped a -> a +instance Wrapper (Y a) where + type Wrapped (Y a) = a -> () + wrap = Y + +fromTicket3018 :: Eq [a] => a -> () +fromTicket3018 x = let {g :: Int -> Int; g = [x]==[x] `seq` id} in () + +main = undefined + diff --git a/testsuite/tests/indexed-types/should_compile/T9090.hs b/testsuite/tests/indexed-types/should_compile/T9090.hs index 6d2b6baba2..b3b639f126 100644 --- a/testsuite/tests/indexed-types/should_compile/T9090.hs +++ b/testsuite/tests/indexed-types/should_compile/T9090.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, ConstraintKinds, TypeFamilies #-} + module T9090 where import GHC.Exts (Constraint) diff --git a/testsuite/tests/indexed-types/should_compile/T9316.hs b/testsuite/tests/indexed-types/should_compile/T9316.hs index b5dfca6a94..ca7680c063 100644 --- a/testsuite/tests/indexed-types/should_compile/T9316.hs +++ b/testsuite/tests/indexed-types/should_compile/T9316.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} diff --git a/testsuite/tests/indexed-types/should_compile/T9747.hs b/testsuite/tests/indexed-types/should_compile/T9747.hs index 05b4397630..0466cbae67 100644 --- a/testsuite/tests/indexed-types/should_compile/T9747.hs +++ b/testsuite/tests/indexed-types/should_compile/T9747.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds, DataKinds, GADTs, TypeFamilies, TypeOperators #-} + module T9747 where import Data.List (intercalate) import Data.Proxy diff --git a/testsuite/tests/indexed-types/should_fail/T2239.hs b/testsuite/tests/indexed-types/should_fail/T2239.hs index d84ea17b31..52a8296e48 100644 --- a/testsuite/tests/indexed-types/should_fail/T2239.hs +++ b/testsuite/tests/indexed-types/should_fail/T2239.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE NoMonomorphismRestriction, RankNTypes #-} {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances, FlexibleContexts, ScopedTypeVariables #-} diff --git a/testsuite/tests/indexed-types/should_fail/T3330c.stderr b/testsuite/tests/indexed-types/should_fail/T3330c.stderr index afb9902adf..97a54ec5cf 100644 --- a/testsuite/tests/indexed-types/should_fail/T3330c.stderr +++ b/testsuite/tests/indexed-types/should_fail/T3330c.stderr @@ -6,5 +6,9 @@ T3330c.hs:23:43: R :: (* -> *) -> * Expected type: Der ((->) x) (f1 x) Actual type: R f1 + Relevant bindings include + x :: x (bound at T3330c.hs:23:29) + df :: f1 x (bound at T3330c.hs:23:25) + plug' :: R f -> Der f x -> x -> f x (bound at T3330c.hs:23:1) In the first argument of ‘plug’, namely ‘rf’ In the first argument of ‘Inl’, namely ‘(plug rf df x)’ diff --git a/testsuite/tests/indexed-types/should_fail/T7862.hs b/testsuite/tests/indexed-types/should_fail/T7862.hs index 050479b32e..081e0c96f0 100644 --- a/testsuite/tests/indexed-types/should_fail/T7862.hs +++ b/testsuite/tests/indexed-types/should_fail/T7862.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, FlexibleContexts #-} -- This used to fail because of the silent-superclass diff --git a/testsuite/tests/indexed-types/should_fail/T7862.stderr b/testsuite/tests/indexed-types/should_fail/T7862.stderr index 3521aea713..5a14fc3480 100644 --- a/testsuite/tests/indexed-types/should_fail/T7862.stderr +++ b/testsuite/tests/indexed-types/should_fail/T7862.stderr @@ -1,5 +1,5 @@ -T7862.hs:22:10: Warning: +T7862.hs:23:10: Warning: No explicit implementation for ‘+’, ‘*’, ‘abs’, ‘signum’, ‘fromInteger’, and (either ‘negate’ or diff --git a/testsuite/tests/module/mod129.hs b/testsuite/tests/module/mod129.hs index 4229e9e88a..caf5c72906 100644 --- a/testsuite/tests/module/mod129.hs +++ b/testsuite/tests/module/mod129.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! hiding class members (but not class.) module M where diff --git a/testsuite/tests/module/mod71.stderr b/testsuite/tests/module/mod71.stderr index 7cf7e0bf7b..12962aa473 100644 --- a/testsuite/tests/module/mod71.stderr +++ b/testsuite/tests/module/mod71.stderr @@ -9,3 +9,12 @@ mod71.hs:4:9: In the first argument of ‘x’, namely ‘_’ In the expression: x _ 1 In an equation for ‘f’: f x = x _ 1 + +mod71.hs:4:11: + No instance for (Num a) arising from the literal ‘1’ + Possible fix: + add (Num a) to the context of + the inferred type of f :: (t1 -> a -> t) -> t + In the second argument of ‘x’, namely ‘1’ + In the expression: x _ 1 + In an equation for ‘f’: f x = x _ 1 diff --git a/testsuite/tests/parser/should_compile/mc15.hs b/testsuite/tests/parser/should_compile/mc15.hs index 2976694803..6197dc4a09 100644 --- a/testsuite/tests/parser/should_compile/mc15.hs +++ b/testsuite/tests/parser/should_compile/mc15.hs @@ -5,7 +5,7 @@ module Foo where import Control.Monad.Zip -foo :: (MonadZip m, Monad m) => m () +foo :: MonadZip m => m () foo = [ () | () <- foo | () <- foo diff --git a/testsuite/tests/parser/should_compile/read002.hs b/testsuite/tests/parser/should_compile/read002.hs index 5b069fe2c6..8d9ea5ea4f 100644 --- a/testsuite/tests/parser/should_compile/read002.hs +++ b/testsuite/tests/parser/should_compile/read002.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! tests fixity reading and printing module ShouldCompile where diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T index 52a532f32f..e83e070dcd 100644 --- a/testsuite/tests/partial-sigs/should_compile/all.T +++ b/testsuite/tests/partial-sigs/should_compile/all.T @@ -29,7 +29,7 @@ test('HigherRank2', normal, compile, ['-ddump-types -fno-warn-partial-type-signa test('LocalDefinitionBug', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) test('Meltdown', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) # Bug -test('MonoLocalBinds', expect_fail, compile, ['-ddump-types -fno-warn-partial-type-signatures']) +test('MonoLocalBinds', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) test('NamedTyVar', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) test('ParensAroundContext', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) test('PatBind', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures']) diff --git a/testsuite/tests/patsyn/should_compile/T8584-2.hs b/testsuite/tests/patsyn/should_compile/T8584-2.hs index d267d39887..24147a258d 100644 --- a/testsuite/tests/patsyn/should_compile/T8584-2.hs +++ b/testsuite/tests/patsyn/should_compile/T8584-2.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE PatternSynonyms #-} + module ShouldCompile where pattern Single :: () => (Show a) => a -> [a] diff --git a/testsuite/tests/patsyn/should_compile/T8968-1.hs b/testsuite/tests/patsyn/should_compile/T8968-1.hs index f41ed5352b..a0e3285a4b 100644 --- a/testsuite/tests/patsyn/should_compile/T8968-1.hs +++ b/testsuite/tests/patsyn/should_compile/T8968-1.hs @@ -6,3 +6,4 @@ data X :: (* -> *) -> * -> * where pattern C :: a -> X Maybe (Maybe a) pattern C x = Y (Just x) + diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T index 91c0012d48..d5d5eed1ce 100644 --- a/testsuite/tests/patsyn/should_compile/all.T +++ b/testsuite/tests/patsyn/should_compile/all.T @@ -15,8 +15,8 @@ test('T9732', normal, compile, ['']) test('T8584-1', normal, compile, ['']) test('T8584-2', normal, compile, ['']) test('T8584-3', normal, compile, ['']) -test('T8968-1', normal, compile, ['']) +test('T8968-1', expect_broken(9953), compile, ['']) test('T8968-2', normal, compile, ['']) -test('T8968-3', normal, compile, ['']) +test('T8968-3', expect_broken(9953), compile, ['']) test('ImpExp_Imp', [extra_clean(['ImpExp_Exp.hi', 'ImpExp_Exp.o'])], multimod_compile, ['ImpExp_Imp', '-v0']) test('T9857', normal, compile, ['']) diff --git a/testsuite/tests/patsyn/should_compile/ex-view.hs b/testsuite/tests/patsyn/should_compile/ex-view.hs index e317274993..699b070b5f 100644 --- a/testsuite/tests/patsyn/should_compile/ex-view.hs +++ b/testsuite/tests/patsyn/should_compile/ex-view.hs @@ -1,6 +1,8 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE PatternSynonyms, GADTs, ViewPatterns #-} + -- Pattern synonyms -{-# LANGUAGE PatternSynonyms, GADTs, ViewPatterns #-} module ShouldCompile where data T a where diff --git a/testsuite/tests/perf/compiler/T3064.hs b/testsuite/tests/perf/compiler/T3064.hs index 39a51de8b0..53a87b599b 100644 --- a/testsuite/tests/perf/compiler/T3064.hs +++ b/testsuite/tests/perf/compiler/T3064.hs @@ -1,5 +1,7 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE Rank2Types, TypeSynonymInstances, FlexibleInstances #-} {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-} + module T3064 where import Control.Applicative diff --git a/testsuite/tests/perf/compiler/T5030.hs b/testsuite/tests/perf/compiler/T5030.hs index b65e9cdd3c..6bb7478b50 100644 --- a/testsuite/tests/perf/compiler/T5030.hs +++ b/testsuite/tests/perf/compiler/T5030.hs @@ -134,15 +134,15 @@ data Operation cpu resultSize where type CDM cpu a = IO a -($=) :: CPU cpu => Var cpu size -> Operation cpu size -> CDM cpu () +($=) :: Var cpu size -> Operation cpu size -> CDM cpu () var $= op = undefined -tempVar :: CPU cpu => CDM cpu (Var cpu size) +tempVar :: CDM cpu (Var cpu size) tempVar = do cnt <- liftM fst undefined return $ Temp cnt -op :: CPU cpu => Operation cpu size -> CDM cpu (Var cpu size) +op :: Operation cpu size -> CDM cpu (Var cpu size) op operation = do v <- tempVar v $= operation diff --git a/testsuite/tests/polykinds/PolyKinds08.hs b/testsuite/tests/polykinds/PolyKinds08.hs index aa64345801..1e01aaa5a9 100644 --- a/testsuite/tests/polykinds/PolyKinds08.hs +++ b/testsuite/tests/polykinds/PolyKinds08.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE PolyKinds #-} module PolyKinds08 where diff --git a/testsuite/tests/polykinds/T6015a.hs b/testsuite/tests/polykinds/T6015a.hs index f42019cc52..cb6104f8d8 100644 --- a/testsuite/tests/polykinds/T6015a.hs +++ b/testsuite/tests/polykinds/T6015a.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE PolyKinds, KindSignatures, FunctionalDependencies, FlexibleInstances, UndecidableInstances, TypeOperators, DataKinds, FlexibleContexts #-} diff --git a/testsuite/tests/polykinds/T6020a.hs b/testsuite/tests/polykinds/T6020a.hs index 00689786c3..abdee4d4f1 100644 --- a/testsuite/tests/polykinds/T6020a.hs +++ b/testsuite/tests/polykinds/T6020a.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances, UndecidableInstances, PolyKinds, KindSignatures, ConstraintKinds, FlexibleContexts, GADTs #-} diff --git a/testsuite/tests/polykinds/T6068.hs b/testsuite/tests/polykinds/T6068.hs index 9c754bd87e..0b414a87b9 100644 --- a/testsuite/tests/polykinds/T6068.hs +++ b/testsuite/tests/polykinds/T6068.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, ExistentialQuantification #-} diff --git a/testsuite/tests/polykinds/T7090.hs b/testsuite/tests/polykinds/T7090.hs index 2364b0cd5a..8f0dbd1878 100644 --- a/testsuite/tests/polykinds/T7090.hs +++ b/testsuite/tests/polykinds/T7090.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE GADTs, ConstraintKinds, TypeFamilies, DataKinds, ScopedTypeVariables, TypeOperators #-} diff --git a/testsuite/tests/polykinds/T7332.hs b/testsuite/tests/polykinds/T7332.hs index 647dd9333d..79623e9803 100644 --- a/testsuite/tests/polykinds/T7332.hs +++ b/testsuite/tests/polykinds/T7332.hs @@ -18,7 +18,7 @@ instance IsString (DC String) where class Monoid acc => Build acc r where - type BuildR r :: * -- Result type + type BuildR r :: * -- Result type build :: (acc -> BuildR r) -> acc -> r instance Monoid dc => Build dc (DC dx) where @@ -31,9 +31,25 @@ instance (Build dc r, a ~ dc) => Build dc (a->r) where -- The type is inferred -tspan :: (Monoid d, Build (DC d) r, BuildR r ~ DC d) => r +-- tspan :: (Monoid d, Build (DC d) r, BuildR r ~ DC d) => r +tspan :: (Build (DC d) r, BuildR r ~ DC d) => r tspan = build (id :: DC d -> DC d) mempty +{- Wanted: + Build acc0 r0 + Monid acc0 + acc0 ~ DC d0 + DC d0 ~ BuildR r0 +==> + Build (DC d0) r0 + Monoid (DC d0) --> Monoid d0 + DC d- ~ BuildR r0 + +In fact Monoid (DC d0) is a superclass of (Build (DC do) r0) +But during inference we do not take upserclasses of wanteds +-} + + foo = tspan "aa" foo1 = tspan (tspan "aa") diff --git a/testsuite/tests/polykinds/T8359.hs b/testsuite/tests/polykinds/T8359.hs index d172270b12..00fabf86a9 100644 --- a/testsuite/tests/polykinds/T8359.hs +++ b/testsuite/tests/polykinds/T8359.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds, MultiParamTypeClasses #-} + module T8359 where class DifferentTypes a b diff --git a/testsuite/tests/polykinds/T9569.hs b/testsuite/tests/polykinds/T9569.hs index 012d61fc31..0e1fdd596a 100644 --- a/testsuite/tests/polykinds/T9569.hs +++ b/testsuite/tests/polykinds/T9569.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, ConstraintKinds, KindSignatures, DataKinds, TypeFamilies #-} module T9569 where diff --git a/testsuite/tests/polykinds/T9750.hs b/testsuite/tests/polykinds/T9750.hs index 9d865d08f6..59b8e60a31 100644 --- a/testsuite/tests/polykinds/T9750.hs +++ b/testsuite/tests/polykinds/T9750.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} diff --git a/testsuite/tests/rebindable/T5821.hs b/testsuite/tests/rebindable/T5821.hs index 7b4f90558f..6adc356897 100644 --- a/testsuite/tests/rebindable/T5821.hs +++ b/testsuite/tests/rebindable/T5821.hs @@ -1,71 +1,72 @@ -{-# LANGUAGE
- ExplicitForAll
- , GADTs
- , RebindableSyntax #-}
-{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
-module T5821a
- ( Writer
- , runWriter
- , execWriter
- , WriterT
- , runWriterT
- , execWriterT
- , tell
- ) where
-
-import Control.Category (Category (id), (>>>))
-
-import Prelude hiding (Monad (..), id)
-import qualified Prelude
-
-newtype Identity a = Identity { runIdentity :: a }
-
-class Monad m where
- (>>=) :: forall e ex x a b . m e ex a -> (a -> m ex x b) -> m e x b
- (>>) :: forall e ex x a b . m e ex a -> m ex x b -> m e x b
- return :: a -> m ex ex a
- fail :: String -> m e x a
-
- {-# INLINE (>>) #-}
- m >> k = m >>= \ _ -> k
- fail = error
-
-type Writer w = WriterT w Identity
-
-runWriter :: Writer w e x a -> (a, w e x)
-runWriter = runIdentity . runWriterT
-
-execWriter :: Writer w e x a -> w e x
-execWriter m = snd (runWriter m)
-
-newtype WriterT w m e x a = WriterT { runWriterT :: m (a, w e x) }
-
-execWriterT :: Prelude.Monad m => WriterT w m e x a -> m (w e x)
-execWriterT m = do
- ~(_, w) <- runWriterT m
- return w
- where
- (>>=) = (Prelude.>>=)
- return = Prelude.return
-
-instance (Category w, Prelude.Monad m) => Monad (WriterT w m) where
- return a = WriterT $ return (a, id)
- where
- return = Prelude.return
- m >>= k = WriterT $ do
- ~(a, w) <- runWriterT m
- ~(b, w') <- runWriterT (k a)
- return (b, w >>> w')
- where
- (>>=) = (Prelude.>>=)
- return = Prelude.return
- fail msg = WriterT $ fail msg
- where
- fail = Prelude.fail
-
-tell :: (Category w, Prelude.Monad m) => w e x -> WriterT w m e x ()
-tell w = WriterT $ return ((), w)
- where
- return = Prelude.return
-
-
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing #-} +{-# LANGUAGE + ExplicitForAll + , GADTs + , RebindableSyntax #-} +module T5821a + ( Writer + , runWriter + , execWriter + , WriterT + , runWriterT + , execWriterT + , tell + ) where + +import Control.Category (Category (id), (>>>)) + +import Prelude hiding (Monad (..), id) +import qualified Prelude + +newtype Identity a = Identity { runIdentity :: a } + +class Monad m where + (>>=) :: forall e ex x a b . m e ex a -> (a -> m ex x b) -> m e x b + (>>) :: forall e ex x a b . m e ex a -> m ex x b -> m e x b + return :: a -> m ex ex a + fail :: String -> m e x a + + {-# INLINE (>>) #-} + m >> k = m >>= \ _ -> k + fail = error + +type Writer w = WriterT w Identity + +runWriter :: Writer w e x a -> (a, w e x) +runWriter = runIdentity . runWriterT + +execWriter :: Writer w e x a -> w e x +execWriter m = snd (runWriter m) + +newtype WriterT w m e x a = WriterT { runWriterT :: m (a, w e x) } + +execWriterT :: Prelude.Monad m => WriterT w m e x a -> m (w e x) +execWriterT m = do + ~(_, w) <- runWriterT m + return w + where + (>>=) = (Prelude.>>=) + return = Prelude.return + +instance (Category w, Prelude.Monad m) => Monad (WriterT w m) where + return a = WriterT $ return (a, id) + where + return = Prelude.return + m >>= k = WriterT $ do + ~(a, w) <- runWriterT m + ~(b, w') <- runWriterT (k a) + return (b, w >>> w') + where + (>>=) = (Prelude.>>=) + return = Prelude.return + fail msg = WriterT $ fail msg + where + fail = Prelude.fail + +tell :: (Category w, Prelude.Monad m) => w e x -> WriterT w m e x () +tell w = WriterT $ return ((), w) + where + return = Prelude.return + + diff --git a/testsuite/tests/rebindable/rebindable9.hs b/testsuite/tests/rebindable/rebindable9.hs index 120a93a3a4..cd3c95ab62 100644 --- a/testsuite/tests/rebindable/rebindable9.hs +++ b/testsuite/tests/rebindable/rebindable9.hs @@ -34,8 +34,8 @@ instance Bind Maybe [] [] where Just x >>= f = f x Nothing >>= f = [] -instance Functor a => Bind Identity a a where m >>= f = f (runIdentity m) -instance Functor a => Bind a Identity a where m >>= f = fmap (runIdentity . f) m +instance Bind Identity a a where m >>= f = f (runIdentity m) +instance Functor a => Bind a Identity a where m >>= f = fmap (runIdentity . f) m instance Prelude.Monad m => Bind m m m where (>>=) = (Prelude.>>=) diff --git a/testsuite/tests/rename/should_fail/rnfail020.hs b/testsuite/tests/rename/should_fail/rnfail020.hs index decd2e80ad..c6efc4d5f7 100644 --- a/testsuite/tests/rename/should_fail/rnfail020.hs +++ b/testsuite/tests/rename/should_fail/rnfail020.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ScopedTypeVariables #-} -- !!! Error messages with scoped type variables diff --git a/testsuite/tests/simplCore/should_compile/T3831.hs b/testsuite/tests/simplCore/should_compile/T3831.hs index 50b1e3567b..9eeb0a20c4 100644 --- a/testsuite/tests/simplCore/should_compile/T3831.hs +++ b/testsuite/tests/simplCore/should_compile/T3831.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-} -- This test has a deep nest of join points, which led to diff --git a/testsuite/tests/simplCore/should_compile/T4398.hs b/testsuite/tests/simplCore/should_compile/T4398.hs index 3cb0647c1c..43463a1885 100644 --- a/testsuite/tests/simplCore/should_compile/T4398.hs +++ b/testsuite/tests/simplCore/should_compile/T4398.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts #-} module T4398 where diff --git a/testsuite/tests/simplCore/should_compile/T4398.stderr b/testsuite/tests/simplCore/should_compile/T4398.stderr index 2f1f567d49..e2411e13c7 100644 --- a/testsuite/tests/simplCore/should_compile/T4398.stderr +++ b/testsuite/tests/simplCore/should_compile/T4398.stderr @@ -1,22 +1,22 @@ -
-T4398.hs:5:11: Warning:
- Forall'd constraint ‘Ord a’ is not bound in RULE lhs
- Orig bndrs: [a, $dOrd, x, y]
- Orig lhs: let {
- $dEq :: Eq a
- [LclId, Str=DmdType]
- $dEq = GHC.Classes.$p1Ord @ a $dOrd } in
- f @ a
- ((\ ($dOrd :: Ord a) ->
- let {
- $dEq :: Eq a
- [LclId, Str=DmdType]
- $dEq = GHC.Classes.$p1Ord @ a $dOrd } in
- let {
- $dEq :: Eq a
- [LclId, Str=DmdType]
- $dEq = GHC.Classes.$p1Ord @ a $dOrd } in
- x)
- $dOrd)
- y
- optimised lhs: f @ a x y
+ +T4398.hs:6:11: Warning: + Forall'd constraint ‘Ord a’ is not bound in RULE lhs + Orig bndrs: [a, $dOrd, x, y] + Orig lhs: let { + $dEq :: Eq a + [LclId, Str=DmdType] + $dEq = GHC.Classes.$p1Ord @ a $dOrd } in + f @ a + ((\ ($dOrd :: Ord a) -> + let { + $dEq :: Eq a + [LclId, Str=DmdType] + $dEq = GHC.Classes.$p1Ord @ a $dOrd } in + let { + $dEq :: Eq a + [LclId, Str=DmdType] + $dEq = GHC.Classes.$p1Ord @ a $dOrd } in + x) + $dOrd) + y + optimised lhs: f @ a x y diff --git a/testsuite/tests/simplCore/should_compile/T5329.hs b/testsuite/tests/simplCore/should_compile/T5329.hs index cf659110ca..f681103578 100644 --- a/testsuite/tests/simplCore/should_compile/T5329.hs +++ b/testsuite/tests/simplCore/should_compile/T5329.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/simplCore/should_compile/T5342.hs b/testsuite/tests/simplCore/should_compile/T5342.hs index eedd7047f5..c9a3130313 100644 --- a/testsuite/tests/simplCore/should_compile/T5342.hs +++ b/testsuite/tests/simplCore/should_compile/T5342.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module T5342 (increaseAreas) where import Control.Monad diff --git a/testsuite/tests/simplCore/should_compile/T5359b.hs b/testsuite/tests/simplCore/should_compile/T5359b.hs index f1ce2091a9..bff4b49d87 100644 --- a/testsuite/tests/simplCore/should_compile/T5359b.hs +++ b/testsuite/tests/simplCore/should_compile/T5359b.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} diff --git a/testsuite/tests/simplCore/should_compile/T5359b.stderr b/testsuite/tests/simplCore/should_compile/T5359b.stderr index 2802476a2d..75dde28fcc 100644 --- a/testsuite/tests/simplCore/should_compile/T5359b.stderr +++ b/testsuite/tests/simplCore/should_compile/T5359b.stderr @@ -1,3 +1,3 @@ -T5359b.hs:61:1: Warning: +T5359b.hs:62:1: Warning: SPECIALISE pragma on INLINE function probably won't fire: ‘genum’ diff --git a/testsuite/tests/simplCore/should_compile/T8848.hs b/testsuite/tests/simplCore/should_compile/T8848.hs index 1ddfe94596..d0f48bdbda 100644 --- a/testsuite/tests/simplCore/should_compile/T8848.hs +++ b/testsuite/tests/simplCore/should_compile/T8848.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE KindSignatures, GADTs, DataKinds, FlexibleInstances, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE KindSignatures, GADTs, DataKinds, FlexibleInstances, FlexibleContexts #-} module T8848 where diff --git a/testsuite/tests/simplCore/should_compile/T8848.stderr b/testsuite/tests/simplCore/should_compile/T8848.stderr index 23ada00c16..4cb138537b 100644 --- a/testsuite/tests/simplCore/should_compile/T8848.stderr +++ b/testsuite/tests/simplCore/should_compile/T8848.stderr @@ -1,77 +1,77 @@ -Rule fired: Class op pure
-Rule fired: Class op <*>
-Rule fired: Class op <*>
-Rule fired: SPEC map2
-Rule fired: Class op fmap
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape 'Z)
-Rule fired: Class op $p1Applicative
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: Class op fmap
-Rule fired: Class op fmap
-Rule fired: SPEC $cfmap @ 'Z
-Rule fired: SPEC $c<$ @ 'Z
-Rule fired: SPEC $fFunctorShape @ 'Z
-Rule fired: Class op fmap
-Rule fired: Class op fmap
-Rule fired: SPEC $c<$ @ 'Z
-Rule fired: SPEC $fFunctorShape @ 'Z
-Rule fired: Class op $p1Applicative
-Rule fired: SPEC $fFunctorShape @ 'Z
-Rule fired: SPEC $cp0Applicative @ 'Z
-Rule fired: SPEC $cpure @ 'Z
-Rule fired: SPEC $c<*> @ 'Z
-Rule fired: SPEC $c*> @ 'Z
-Rule fired: SPEC $c<* @ 'Z
-Rule fired: SPEC $fApplicativeShape @ 'Z
-Rule fired: SPEC $fApplicativeShape @ 'Z
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: SPEC $c<* @ 'Z
-Rule fired: SPEC $c*> @ 'Z
-Rule fired: SPEC $fApplicativeShape @ 'Z
-Rule fired: SPEC $fApplicativeShape @ 'Z
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape ('S 'Z))
-Rule fired: Class op $p1Applicative
-Rule fired: Class op fmap
-Rule fired: Class op <*>
-Rule fired: SPEC $fApplicativeShape @ 'Z
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: Class op $p1Applicative
-Rule fired: Class op <$
-Rule fired: Class op <*>
-Rule fired: SPEC $fFunctorShape @ 'Z
-Rule fired: Class op fmap
-Rule fired: Class op fmap
+Rule fired: Class op pure +Rule fired: Class op <*> +Rule fired: Class op <*> +Rule fired: SPEC map2 +Rule fired: Class op fmap +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape 'Z) +Rule fired: Class op $p1Applicative +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: Class op fmap +Rule fired: Class op fmap +Rule fired: SPEC $cfmap @ 'Z +Rule fired: SPEC $c<$ @ 'Z +Rule fired: SPEC $fFunctorShape @ 'Z +Rule fired: Class op fmap +Rule fired: Class op fmap +Rule fired: SPEC $c<$ @ 'Z +Rule fired: SPEC $fFunctorShape @ 'Z +Rule fired: Class op $p1Applicative +Rule fired: SPEC $fFunctorShape @ 'Z +Rule fired: SPEC $cp1Applicative @ 'Z +Rule fired: SPEC $cpure @ 'Z +Rule fired: SPEC $c<*> @ 'Z +Rule fired: SPEC $c*> @ 'Z +Rule fired: SPEC $c<* @ 'Z +Rule fired: SPEC $fApplicativeShape @ 'Z +Rule fired: SPEC $fApplicativeShape @ 'Z +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: SPEC $c<* @ 'Z +Rule fired: SPEC $c*> @ 'Z +Rule fired: SPEC $fApplicativeShape @ 'Z +Rule fired: SPEC $fApplicativeShape @ 'Z +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: SPEC/T8848 liftA2 _ _ _ @ (Shape ('S 'Z)) +Rule fired: Class op $p1Applicative +Rule fired: Class op fmap +Rule fired: Class op <*> +Rule fired: SPEC $fApplicativeShape @ 'Z +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: Class op $p1Applicative +Rule fired: Class op <$ +Rule fired: Class op <*> +Rule fired: SPEC $fFunctorShape @ 'Z +Rule fired: Class op fmap +Rule fired: Class op fmap diff --git a/testsuite/tests/simplCore/should_compile/T8848a.hs b/testsuite/tests/simplCore/should_compile/T8848a.hs index 81e757f8c2..9df4c5be84 100644 --- a/testsuite/tests/simplCore/should_compile/T8848a.hs +++ b/testsuite/tests/simplCore/should_compile/T8848a.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module T8848a where f :: Ord a => b -> a -> a diff --git a/testsuite/tests/simplCore/should_compile/simpl002.hs b/testsuite/tests/simplCore/should_compile/simpl002.hs index b262f47d38..acb0a146e7 100644 --- a/testsuite/tests/simplCore/should_compile/simpl002.hs +++ b/testsuite/tests/simplCore/should_compile/simpl002.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! class/instance mumble that failed Lint at one time -- module ShouldCompile where diff --git a/testsuite/tests/simplCore/should_compile/simpl007.hs b/testsuite/tests/simplCore/should_compile/simpl007.hs index c7277b7f66..0b22564e68 100644 --- a/testsuite/tests/simplCore/should_compile/simpl007.hs +++ b/testsuite/tests/simplCore/should_compile/simpl007.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UndecidableInstances, ExistentialQuantification, FlexibleInstances #-} diff --git a/testsuite/tests/simplCore/should_compile/simpl014.hs b/testsuite/tests/simplCore/should_compile/simpl014.hs index 2f2e78fa76..fe603dd666 100644 --- a/testsuite/tests/simplCore/should_compile/simpl014.hs +++ b/testsuite/tests/simplCore/should_compile/simpl014.hs @@ -1,4 +1,5 @@ {-# LANGUAGE RankNTypes, GADTs, FlexibleContexts #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# OPTIONS_GHC -O2 #-} -- This one make SpecConstr generate bogus code (hence -O2), diff --git a/testsuite/tests/simplCore/should_compile/simpl016.hs b/testsuite/tests/simplCore/should_compile/simpl016.hs index 6ba088e6fa..4f371a78f0 100644 --- a/testsuite/tests/simplCore/should_compile/simpl016.hs +++ b/testsuite/tests/simplCore/should_compile/simpl016.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- Test for trac ticket #1287; ghc 6.6 and 6.6.1 panicked on this module ShouldCompile where diff --git a/testsuite/tests/simplCore/should_compile/simpl016.stderr b/testsuite/tests/simplCore/should_compile/simpl016.stderr index e08b16db8d..b59faae1fd 100644 --- a/testsuite/tests/simplCore/should_compile/simpl016.stderr +++ b/testsuite/tests/simplCore/should_compile/simpl016.stderr @@ -1,10 +1,10 @@ -
-simpl016.hs:5:1: Warning:
- Forall'd constraint ‘Num b’ is not bound in RULE lhs
- Orig bndrs: [b, $dNum]
- Orig lhs: let {
- $dEq :: Eq Int
- [LclId, Str=DmdType]
- $dEq = GHC.Classes.$fEqInt } in
- delta' @ Int @ b $dEq
- optimised lhs: delta' @ Int @ b $dEq
+ +simpl016.hs:7:1: Warning: + Forall'd constraint ‘Num b’ is not bound in RULE lhs + Orig bndrs: [b, $dNum] + Orig lhs: let { + $dEq :: Eq Int + [LclId, Str=DmdType] + $dEq = GHC.Classes.$fEqInt } in + delta' @ Int @ b $dEq + optimised lhs: delta' @ Int @ b $dEq diff --git a/testsuite/tests/simplCore/should_compile/spec003.hs b/testsuite/tests/simplCore/should_compile/spec003.hs index 7ebb901106..5ea6d33283 100644 --- a/testsuite/tests/simplCore/should_compile/spec003.hs +++ b/testsuite/tests/simplCore/should_compile/spec003.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- Trac #1402 -- Broke the specialiser diff --git a/testsuite/tests/th/T3100.hs b/testsuite/tests/th/T3100.hs index edb943933a..9e529f13db 100644 --- a/testsuite/tests/th/T3100.hs +++ b/testsuite/tests/th/T3100.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, FlexibleContexts, ImplicitParams, TemplateHaskell #-} -- This test makes sure TH understands types where diff --git a/testsuite/tests/th/T7021a.hs b/testsuite/tests/th/T7021a.hs index 0eadecf4c6..b07ef55196 100644 --- a/testsuite/tests/th/T7021a.hs +++ b/testsuite/tests/th/T7021a.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds, TemplateHaskell, PolyKinds, TypeFamilies, RankNTypes #-} module T7021a where diff --git a/testsuite/tests/th/T8807.hs b/testsuite/tests/th/T8807.hs index 7d21796298..17157bfbd2 100644 --- a/testsuite/tests/th/T8807.hs +++ b/testsuite/tests/th/T8807.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds, RankNTypes #-} module T8807 where diff --git a/testsuite/tests/th/TH_tf3.hs b/testsuite/tests/th/TH_tf3.hs index 08e089fdf1..a45cb30799 100644 --- a/testsuite/tests/th/TH_tf3.hs +++ b/testsuite/tests/th/TH_tf3.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, FlexibleInstances, UndecidableInstances #-} module TH_tf3 where diff --git a/testsuite/tests/typecheck/should_compile/GivenOverlapping.hs b/testsuite/tests/typecheck/should_compile/GivenOverlapping.hs index 35f4b07962..68d0dd4714 100644 --- a/testsuite/tests/typecheck/should_compile/GivenOverlapping.hs +++ b/testsuite/tests/typecheck/should_compile/GivenOverlapping.hs @@ -1,21 +1,22 @@ -{-# LANGUAGE FunctionalDependencies, FlexibleContexts #-}
-
-class C a where
-
-class D a where
- dop :: a -> a
-
-instance C a => D [a] where
- dop = undefined
-
-class J a b | a -> b
- where j :: a -> b -> ()
-
-instance J Bool Int where
- j = undefined
-
-foo :: D [Int] => ()
-foo = j True (head (dop [undefined]))
-
-main = return ()
-
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE FunctionalDependencies, FlexibleContexts #-} + +class C a where + +class D a where + dop :: a -> a + +instance C a => D [a] where + dop = undefined + +class J a b | a -> b + where j :: a -> b -> () + +instance J Bool Int where + j = undefined + +foo :: D [Int] => () +foo = j True (head (dop [undefined])) + +main = return () + diff --git a/testsuite/tests/typecheck/should_compile/LoopOfTheDay1.hs b/testsuite/tests/typecheck/should_compile/LoopOfTheDay1.hs index e3b656a66e..860b9ede24 100644 --- a/testsuite/tests/typecheck/should_compile/LoopOfTheDay1.hs +++ b/testsuite/tests/typecheck/should_compile/LoopOfTheDay1.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-} -- Compiles fine. diff --git a/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs b/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs index 0996e7c2f2..356fc728e0 100644 --- a/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs +++ b/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-} -- Compilation loops in GHC 6.2! diff --git a/testsuite/tests/typecheck/should_compile/LoopOfTheDay3.hs b/testsuite/tests/typecheck/should_compile/LoopOfTheDay3.hs index f1c1b49839..f83b151cb1 100644 --- a/testsuite/tests/typecheck/should_compile/LoopOfTheDay3.hs +++ b/testsuite/tests/typecheck/should_compile/LoopOfTheDay3.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/T1470.hs b/testsuite/tests/typecheck/should_compile/T1470.hs index 2482696452..3206fa8a95 100644 --- a/testsuite/tests/typecheck/should_compile/T1470.hs +++ b/testsuite/tests/typecheck/should_compile/T1470.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, UndecidableInstances, KindSignatures #-} -- Trac #1470 diff --git a/testsuite/tests/typecheck/should_compile/T2683.hs b/testsuite/tests/typecheck/should_compile/T2683.hs index 07fad170c6..9f3591af46 100644 --- a/testsuite/tests/typecheck/should_compile/T2683.hs +++ b/testsuite/tests/typecheck/should_compile/T2683.hs @@ -1,31 +1,32 @@ -{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses,
- FunctionalDependencies, RankNTypes #-}
-
-module Q where
-
-class Transformer t a | t -> a where
- transform :: t -> l a -> (forall l'. l' a -> b) -> b
-
-data EL a = forall l. EL (l a)
-
-unEL :: EL a -> (forall l. l a -> b) -> b
-unEL = error "unEL"
-
-transform' :: (Transformer t a) => t -> EL a -> EL a
-transform' = error "transform'"
-
-data MultiToggleS ts a = MultiToggleS ts
-
-data MultiToggle = MultiToggle
-
-expand :: HList ts a => MultiToggleS ts a -> MultiToggle
-expand (MultiToggleS ts) =
- resolve ts
- (\x mt ->
- let g = transform' x in
- mt
- )
- MultiToggle
-
-class HList c a | c -> a where
- resolve :: c -> (forall t. (Transformer t a) => t -> b) -> b
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses, + FunctionalDependencies, RankNTypes #-} + +module Q where + +class Transformer t a | t -> a where + transform :: t -> l a -> (forall l'. l' a -> b) -> b + +data EL a = forall l. EL (l a) + +unEL :: EL a -> (forall l. l a -> b) -> b +unEL = error "unEL" + +transform' :: (Transformer t a) => t -> EL a -> EL a +transform' = error "transform'" + +data MultiToggleS ts a = MultiToggleS ts + +data MultiToggle = MultiToggle + +expand :: HList ts a => MultiToggleS ts a -> MultiToggle +expand (MultiToggleS ts) = + resolve ts + (\x mt -> + let g = transform' x in + mt + ) + MultiToggle + +class HList c a | c -> a where + resolve :: c -> (forall t. (Transformer t a) => t -> b) -> b diff --git a/testsuite/tests/typecheck/should_compile/T3018.hs b/testsuite/tests/typecheck/should_compile/T3018.hs index 296185de30..bf178e0898 100644 --- a/testsuite/tests/typecheck/should_compile/T3018.hs +++ b/testsuite/tests/typecheck/should_compile/T3018.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -w #-} {-# LANGUAGE UndecidableInstances, EmptyDataDecls #-} {-# LANGUAGE RankNTypes, KindSignatures, MultiParamTypeClasses, FlexibleInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/T3108.hs b/testsuite/tests/typecheck/should_compile/T3108.hs index 2adaa1aef7..f2ac8d536e 100644 --- a/testsuite/tests/typecheck/should_compile/T3108.hs +++ b/testsuite/tests/typecheck/should_compile/T3108.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/T3692.hs b/testsuite/tests/typecheck/should_compile/T3692.hs index 9fccb0a52f..5be093f55f 100644 --- a/testsuite/tests/typecheck/should_compile/T3692.hs +++ b/testsuite/tests/typecheck/should_compile/T3692.hs @@ -1,10 +1,11 @@ -{-# LANGUAGE RankNTypes #-}
-
-module T3692 where
-
-type Foo a b = () -> (Bar a => a)
-
-class Bar a where {}
-
-foo :: Foo a b
-foo = id (undefined :: Foo p q)
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE RankNTypes #-} + +module T3692 where + +type Foo a b = () -> (Bar a => a) + +class Bar a where {} + +foo :: Foo a b +foo = id (undefined :: Foo p q) diff --git a/testsuite/tests/typecheck/should_compile/T3743.hs b/testsuite/tests/typecheck/should_compile/T3743.hs index cc8c6cca23..fd1b1d14b4 100644 --- a/testsuite/tests/typecheck/should_compile/T3743.hs +++ b/testsuite/tests/typecheck/should_compile/T3743.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImplicitParams, GADTs #-} module T3743 where diff --git a/testsuite/tests/typecheck/should_compile/T4361.hs b/testsuite/tests/typecheck/should_compile/T4361.hs index 725d12088e..ee5a9cc3cb 100644 --- a/testsuite/tests/typecheck/should_compile/T4361.hs +++ b/testsuite/tests/typecheck/should_compile/T4361.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts #-} -- This test comes from Sergei Mechveliani's DoCon system diff --git a/testsuite/tests/typecheck/should_compile/T4401.hs b/testsuite/tests/typecheck/should_compile/T4401.hs index 81fcf71a96..23ee12cadb 100644 --- a/testsuite/tests/typecheck/should_compile/T4401.hs +++ b/testsuite/tests/typecheck/should_compile/T4401.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies #-} module T4401 where diff --git a/testsuite/tests/typecheck/should_compile/T4524.hs b/testsuite/tests/typecheck/should_compile/T4524.hs index 27cbb1f7e0..669c4b268a 100644 --- a/testsuite/tests/typecheck/should_compile/T4524.hs +++ b/testsuite/tests/typecheck/should_compile/T4524.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE GADTs, TypeOperators, diff --git a/testsuite/tests/typecheck/should_compile/T4952.hs b/testsuite/tests/typecheck/should_compile/T4952.hs index 42d6258c2f..0788ad148a 100644 --- a/testsuite/tests/typecheck/should_compile/T4952.hs +++ b/testsuite/tests/typecheck/should_compile/T4952.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UndecidableInstances, MultiParamTypeClasses, KindSignatures, diff --git a/testsuite/tests/typecheck/should_compile/T4969.hs b/testsuite/tests/typecheck/should_compile/T4969.hs index e35b37eb27..6a087974c7 100644 --- a/testsuite/tests/typecheck/should_compile/T4969.hs +++ b/testsuite/tests/typecheck/should_compile/T4969.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -w #-} +{-# OPTIONS_GHC -w -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, FlexibleInstances, OverlappingInstances, UndecidableInstances, diff --git a/testsuite/tests/typecheck/should_compile/T5514.hs b/testsuite/tests/typecheck/should_compile/T5514.hs index 71a01bad39..9b8821ecd4 100644 --- a/testsuite/tests/typecheck/should_compile/T5514.hs +++ b/testsuite/tests/typecheck/should_compile/T5514.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module T5514 where class Foo a where diff --git a/testsuite/tests/typecheck/should_compile/T5581.hs b/testsuite/tests/typecheck/should_compile/T5581.hs index 0e957285f8..074a2babcd 100644 --- a/testsuite/tests/typecheck/should_compile/T5581.hs +++ b/testsuite/tests/typecheck/should_compile/T5581.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds, FlexibleContexts, FlexibleInstances, KindSignatures #-} + module TcShouldTerminate where import GHC.Prim (Constraint) diff --git a/testsuite/tests/typecheck/should_compile/T5676.hs b/testsuite/tests/typecheck/should_compile/T5676.hs index 9fa8404b0b..c35fc2688d 100644 --- a/testsuite/tests/typecheck/should_compile/T5676.hs +++ b/testsuite/tests/typecheck/should_compile/T5676.hs @@ -1,19 +1,20 @@ -{-# LANGUAGE ScopedTypeVariables, InstanceSigs #-}
-module Foo where
-
-data T a = T a
-
-class C a where
- foo :: b -> a -> (a, [b])
-
-instance C a => C (T a) where
- foo :: forall b. b -> T a -> (T a, [b])
- foo x (T y) = (T y, xs)
- where
- xs :: [b]
- xs = [x,x,x]
-
-instance Functor T where
- fmap :: (a -> b) -> T a -> T b
- fmap f (T x) = T (f x)
-
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# LANGUAGE ScopedTypeVariables, InstanceSigs #-} +module Foo where + +data T a = T a + +class C a where + foo :: b -> a -> (a, [b]) + +instance C a => C (T a) where + foo :: forall b. b -> T a -> (T a, [b]) + foo x (T y) = (T y, xs) + where + xs :: [b] + xs = [x,x,x] + +instance Functor T where + fmap :: (a -> b) -> T a -> T b + fmap f (T x) = T (f x) + diff --git a/testsuite/tests/typecheck/should_compile/T6055.hs b/testsuite/tests/typecheck/should_compile/T6055.hs index dcc39d1618..f5fc354af2 100644 --- a/testsuite/tests/typecheck/should_compile/T6055.hs +++ b/testsuite/tests/typecheck/should_compile/T6055.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/typecheck/should_compile/T6134.hs b/testsuite/tests/typecheck/should_compile/T6134.hs index 90f1504a48..1421a13b89 100644 --- a/testsuite/tests/typecheck/should_compile/T6134.hs +++ b/testsuite/tests/typecheck/should_compile/T6134.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FunctionalDependencies #-} module T6134 where diff --git a/testsuite/tests/typecheck/should_compile/T7171a.hs b/testsuite/tests/typecheck/should_compile/T7171a.hs index c2d7ec9bca..a25c31b9e1 100644 --- a/testsuite/tests/typecheck/should_compile/T7171a.hs +++ b/testsuite/tests/typecheck/should_compile/T7171a.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module T7171a where diff --git a/testsuite/tests/typecheck/should_compile/T7196.hs b/testsuite/tests/typecheck/should_compile/T7196.hs index 29242b27fd..f4c54c5119 100644 --- a/testsuite/tests/typecheck/should_compile/T7196.hs +++ b/testsuite/tests/typecheck/should_compile/T7196.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} diff --git a/testsuite/tests/typecheck/should_compile/T7220.hs b/testsuite/tests/typecheck/should_compile/T7220.hs index bf4df871f5..99e9a970c3 100644 --- a/testsuite/tests/typecheck/should_compile/T7220.hs +++ b/testsuite/tests/typecheck/should_compile/T7220.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/typecheck/should_compile/T7541.hs b/testsuite/tests/typecheck/should_compile/T7541.hs index e0ae55a50d..6292858bd8 100644 --- a/testsuite/tests/typecheck/should_compile/T7541.hs +++ b/testsuite/tests/typecheck/should_compile/T7541.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-duplicate-constraints #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts, Rank2Types #-} module Test where diff --git a/testsuite/tests/typecheck/should_compile/T7875.hs b/testsuite/tests/typecheck/should_compile/T7875.hs index 9a8bf460cd..471a2e2d7d 100644 --- a/testsuite/tests/typecheck/should_compile/T7875.hs +++ b/testsuite/tests/typecheck/should_compile/T7875.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts , FlexibleInstances diff --git a/testsuite/tests/typecheck/should_compile/T7903.hs b/testsuite/tests/typecheck/should_compile/T7903.hs index 662af0c854..e631677806 100644 --- a/testsuite/tests/typecheck/should_compile/T7903.hs +++ b/testsuite/tests/typecheck/should_compile/T7903.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE KindSignatures #-} module T7903 where diff --git a/testsuite/tests/typecheck/should_compile/T7903.stderr-ghc b/testsuite/tests/typecheck/should_compile/T7903.stderr-ghc index 2214c3531f..7020e1c0e5 100644 --- a/testsuite/tests/typecheck/should_compile/T7903.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/T7903.stderr-ghc @@ -1,10 +1,10 @@ -T7903.hs:5:10: Warning: +T7903.hs:6:10: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (a -> b)’ -T7903.hs:6:10: Warning: +T7903.hs:7:10: Warning: No explicit implementation for either ‘compare’ or ‘<=’ In the instance declaration for ‘Ord (a -> b)’ diff --git a/testsuite/tests/typecheck/should_compile/Tc170_Aux.hs b/testsuite/tests/typecheck/should_compile/Tc170_Aux.hs index c7cd186f13..da9b773f28 100644 --- a/testsuite/tests/typecheck/should_compile/Tc170_Aux.hs +++ b/testsuite/tests/typecheck/should_compile/Tc170_Aux.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Tc170_Aux where diff --git a/testsuite/tests/typecheck/should_compile/Tc173a.hs b/testsuite/tests/typecheck/should_compile/Tc173a.hs index f3704ccd9a..99e8471ae0 100644 --- a/testsuite/tests/typecheck/should_compile/Tc173a.hs +++ b/testsuite/tests/typecheck/should_compile/Tc173a.hs @@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances, UndecidableInstances #-} + module Tc173a where class FormValue value where diff --git a/testsuite/tests/typecheck/should_compile/tc045.hs b/testsuite/tests/typecheck/should_compile/tc045.hs index 4ff3766673..acaad96b36 100644 --- a/testsuite/tests/typecheck/should_compile/tc045.hs +++ b/testsuite/tests/typecheck/should_compile/tc045.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module ShouldSucceed where class C a where diff --git a/testsuite/tests/typecheck/should_compile/tc051.hs b/testsuite/tests/typecheck/should_compile/tc051.hs index 7f14282fb8..e02143a5f1 100644 --- a/testsuite/tests/typecheck/should_compile/tc051.hs +++ b/testsuite/tests/typecheck/should_compile/tc051.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldSucceed where class Eq' a where diff --git a/testsuite/tests/typecheck/should_compile/tc056.stderr b/testsuite/tests/typecheck/should_compile/tc056.stderr index 0c8f669b30..11641ff186 100644 --- a/testsuite/tests/typecheck/should_compile/tc056.stderr +++ b/testsuite/tests/typecheck/should_compile/tc056.stderr @@ -1,6 +1,4 @@ -tc056.hs:16:10: Warning: - Duplicate constraint(s): Eq' a - In the context: (Eq' a, Eq' a) - While checking an instance declaration +tc056.hs:16:10: + Redundant constraints: (Eq' a, Eq' a) In the instance declaration for ‘Eq' [a]’ diff --git a/testsuite/tests/typecheck/should_compile/tc058.hs b/testsuite/tests/typecheck/should_compile/tc058.hs index 7df1f3bc6d..1bd10feb93 100644 --- a/testsuite/tests/typecheck/should_compile/tc058.hs +++ b/testsuite/tests/typecheck/should_compile/tc058.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + module ShouldSucceed where class Eq2 a where diff --git a/testsuite/tests/typecheck/should_compile/tc065.hs b/testsuite/tests/typecheck/should_compile/tc065.hs index 1d47cf35c4..510eca6103 100644 --- a/testsuite/tests/typecheck/should_compile/tc065.hs +++ b/testsuite/tests/typecheck/should_compile/tc065.hs @@ -68,7 +68,7 @@ type FlattenedDependencyInfo vertex name code mkVertices :: FlattenedDependencyInfo vertex name code -> [vertex] mkVertices info = [ vertex | (vertex,_,_,_) <- info] -mkEdges :: (Eq vertex, Ord name) => +mkEdges :: (Ord name) => [vertex] -> FlattenedDependencyInfo vertex name code -> [Edge vertex] @@ -85,7 +85,7 @@ mkEdges vertices flat_info name `Set.member` names_defined ] -lookupVertex :: (Eq vertex, Ord name) => +lookupVertex :: (Eq vertex) => FlattenedDependencyInfo vertex name code -> vertex -> code diff --git a/testsuite/tests/typecheck/should_compile/tc078.hs b/testsuite/tests/typecheck/should_compile/tc078.hs index de5e748d20..2bd1ebd062 100644 --- a/testsuite/tests/typecheck/should_compile/tc078.hs +++ b/testsuite/tests/typecheck/should_compile/tc078.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! instance decls with no binds -- module ShouldFail where diff --git a/testsuite/tests/typecheck/should_compile/tc078.stderr-ghc b/testsuite/tests/typecheck/should_compile/tc078.stderr-ghc index bb5d9f566e..fa9d3acd2e 100644 --- a/testsuite/tests/typecheck/should_compile/tc078.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/tc078.stderr-ghc @@ -1,10 +1,10 @@ -tc078.hs:7:10: Warning: +tc078.hs:9:10: Warning: No explicit implementation for either ‘==’ or ‘/=’ In the instance declaration for ‘Eq (Bar a)’ -tc078.hs:8:10: Warning: +tc078.hs:10:10: Warning: No explicit implementation for either ‘compare’ or ‘<=’ In the instance declaration for ‘Ord (Bar a)’ diff --git a/testsuite/tests/typecheck/should_compile/tc079.hs b/testsuite/tests/typecheck/should_compile/tc079.hs index db07ad1325..6784df6024 100644 --- a/testsuite/tests/typecheck/should_compile/tc079.hs +++ b/testsuite/tests/typecheck/should_compile/tc079.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! small class decl with local polymorphism; -- !!! "easy" to check default methods and such... -- !!! (this is the example given in TcClassDcl) diff --git a/testsuite/tests/typecheck/should_compile/tc088.hs b/testsuite/tests/typecheck/should_compile/tc088.hs index b6bf497050..147909e432 100644 --- a/testsuite/tests/typecheck/should_compile/tc088.hs +++ b/testsuite/tests/typecheck/should_compile/tc088.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- Check that "->" is an instance of Eval module ShouldSucceed where diff --git a/testsuite/tests/typecheck/should_compile/tc091.hs b/testsuite/tests/typecheck/should_compile/tc091.hs index 628b571c61..05937f5164 100644 --- a/testsuite/tests/typecheck/should_compile/tc091.hs +++ b/testsuite/tests/typecheck/should_compile/tc091.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! Test polymorphic recursion diff --git a/testsuite/tests/typecheck/should_compile/tc092.hs b/testsuite/tests/typecheck/should_compile/tc092.hs index 58493c6715..4a6c893e7d 100644 --- a/testsuite/tests/typecheck/should_compile/tc092.hs +++ b/testsuite/tests/typecheck/should_compile/tc092.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes #-} module ShouldSucceed where diff --git a/testsuite/tests/typecheck/should_compile/tc109.hs b/testsuite/tests/typecheck/should_compile/tc109.hs index 0d9fdc051c..2a08caea08 100644 --- a/testsuite/tests/typecheck/should_compile/tc109.hs +++ b/testsuite/tests/typecheck/should_compile/tc109.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-} -- UndecidableInstances because 'b' appears in the context but not the head diff --git a/testsuite/tests/typecheck/should_compile/tc113.hs b/testsuite/tests/typecheck/should_compile/tc113.hs index 38e79743e4..2ead3c2798 100644 --- a/testsuite/tests/typecheck/should_compile/tc113.hs +++ b/testsuite/tests/typecheck/should_compile/tc113.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! Monomorphism restriction module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc115.hs b/testsuite/tests/typecheck/should_compile/tc115.hs index 139b3a5323..0054a24ebc 100644 --- a/testsuite/tests/typecheck/should_compile/tc115.hs +++ b/testsuite/tests/typecheck/should_compile/tc115.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} -- !!! Functional dependencies diff --git a/testsuite/tests/typecheck/should_compile/tc115.stderr-ghc b/testsuite/tests/typecheck/should_compile/tc115.stderr-ghc index e90ef21e12..4f7981ac56 100644 --- a/testsuite/tests/typecheck/should_compile/tc115.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/tc115.stderr-ghc @@ -1,5 +1,5 @@ -tc115.hs:12:10: Warning: +tc115.hs:13:10: Warning: No explicit implementation for ‘foo’ In the instance declaration for ‘Foo [m a] (m a)’ diff --git a/testsuite/tests/typecheck/should_compile/tc116.hs b/testsuite/tests/typecheck/should_compile/tc116.hs index eb93410bed..58b9ead731 100644 --- a/testsuite/tests/typecheck/should_compile/tc116.hs +++ b/testsuite/tests/typecheck/should_compile/tc116.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} -- !!! Functional dependencies diff --git a/testsuite/tests/typecheck/should_compile/tc116.stderr-ghc b/testsuite/tests/typecheck/should_compile/tc116.stderr-ghc index 91fa0a1130..074a795956 100644 --- a/testsuite/tests/typecheck/should_compile/tc116.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/tc116.stderr-ghc @@ -1,5 +1,5 @@ -tc116.hs:12:10: Warning: +tc116.hs:13:10: Warning: No explicit implementation for ‘foo’ In the instance declaration for ‘Foo [m a] (m a)’ diff --git a/testsuite/tests/typecheck/should_compile/tc125.hs b/testsuite/tests/typecheck/should_compile/tc125.hs index 8d820ba209..75602edac2 100644 --- a/testsuite/tests/typecheck/should_compile/tc125.hs +++ b/testsuite/tests/typecheck/should_compile/tc125.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-} -- UndecidableInstances now needed because the Coverage Condition fails diff --git a/testsuite/tests/typecheck/should_compile/tc125.stderr-ghc b/testsuite/tests/typecheck/should_compile/tc125.stderr-ghc index 5631c08a1c..d57cda2b19 100644 --- a/testsuite/tests/typecheck/should_compile/tc125.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/tc125.stderr-ghc @@ -1,25 +1,25 @@ -tc125.hs:16:10: Warning: +tc125.hs:17:10: Warning: No explicit implementation for ‘add’ In the instance declaration for ‘Add Z a a’ -tc125.hs:17:10: Warning: +tc125.hs:18:10: Warning: No explicit implementation for ‘add’ In the instance declaration for ‘Add (S a) b (S c)’ -tc125.hs:21:10: Warning: +tc125.hs:22:10: Warning: No explicit implementation for ‘mul’ In the instance declaration for ‘Mul Z a Z’ -tc125.hs:22:10: Warning: +tc125.hs:23:10: Warning: No explicit implementation for ‘mul’ In the instance declaration for ‘Mul (S a) b d’ -tc125.hs:29:10: Warning: +tc125.hs:30:10: Warning: No explicit implementation for ‘add’ In the instance declaration for ‘Add (Q a b) (Q c d) (Q ad_bc bd)’ diff --git a/testsuite/tests/typecheck/should_compile/tc126.hs b/testsuite/tests/typecheck/should_compile/tc126.hs index 2680ea6290..87d63dd771 100644 --- a/testsuite/tests/typecheck/should_compile/tc126.hs +++ b/testsuite/tests/typecheck/should_compile/tc126.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} -- UndecidableInstances now needed because the Coverage Condition fails diff --git a/testsuite/tests/typecheck/should_compile/tc126.stderr-ghc b/testsuite/tests/typecheck/should_compile/tc126.stderr-ghc index 4adc2a29f4..3c766d813e 100644 --- a/testsuite/tests/typecheck/should_compile/tc126.stderr-ghc +++ b/testsuite/tests/typecheck/should_compile/tc126.stderr-ghc @@ -1,10 +1,10 @@ -tc126.hs:15:25: Warning: +tc126.hs:16:25: Warning: No explicit implementation for ‘bug’ In the instance declaration for ‘Bug (Int -> r) Int r’ -tc126.hs:16:10: Warning: +tc126.hs:17:10: Warning: No explicit implementation for ‘bug’ In the instance declaration for ‘Bug f (c a) (c r)’ diff --git a/testsuite/tests/typecheck/should_compile/tc145.hs b/testsuite/tests/typecheck/should_compile/tc145.hs index 04910a3ce5..31e45cd9e9 100644 --- a/testsuite/tests/typecheck/should_compile/tc145.hs +++ b/testsuite/tests/typecheck/should_compile/tc145.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, ImplicitParams, UnboxedTuples #-} -- Test two slightly exotic things about type signatures diff --git a/testsuite/tests/typecheck/should_compile/tc152.hs b/testsuite/tests/typecheck/should_compile/tc152.hs index 43f107365d..4e618be958 100644 --- a/testsuite/tests/typecheck/should_compile/tc152.hs +++ b/testsuite/tests/typecheck/should_compile/tc152.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-} -- -XUndecidableInstances now needed because the Coverage Condition fails diff --git a/testsuite/tests/typecheck/should_compile/tc176.hs b/testsuite/tests/typecheck/should_compile/tc176.hs index 94fdcb2227..d41cbb564e 100644 --- a/testsuite/tests/typecheck/should_compile/tc176.hs +++ b/testsuite/tests/typecheck/should_compile/tc176.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} {- With "hugs -98 +o test.hs" gives me: diff --git a/testsuite/tests/typecheck/should_compile/tc178.hs b/testsuite/tests/typecheck/should_compile/tc178.hs index 2a181208d4..d8904c12db 100644 --- a/testsuite/tests/typecheck/should_compile/tc178.hs +++ b/testsuite/tests/typecheck/should_compile/tc178.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} -- This one tickled the kind-check in TcType.matchTys, diff --git a/testsuite/tests/typecheck/should_compile/tc180.hs b/testsuite/tests/typecheck/should_compile/tc180.hs index 1a404ad5de..6a6af407ce 100644 --- a/testsuite/tests/typecheck/should_compile/tc180.hs +++ b/testsuite/tests/typecheck/should_compile/tc180.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/tc181.hs b/testsuite/tests/typecheck/should_compile/tc181.hs index 6ccf6b90de..b3ae86651c 100644 --- a/testsuite/tests/typecheck/should_compile/tc181.hs +++ b/testsuite/tests/typecheck/should_compile/tc181.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/tc183.hs b/testsuite/tests/typecheck/should_compile/tc183.hs index a565ab04ab..c001dc9b5c 100644 --- a/testsuite/tests/typecheck/should_compile/tc183.hs +++ b/testsuite/tests/typecheck/should_compile/tc183.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ExistentialQuantification, RankNTypes #-} -- An interesting interaction of universals and existentials, prompted by diff --git a/testsuite/tests/typecheck/should_compile/tc187.hs b/testsuite/tests/typecheck/should_compile/tc187.hs index 15946f8a50..17ced8677a 100644 --- a/testsuite/tests/typecheck/should_compile/tc187.hs +++ b/testsuite/tests/typecheck/should_compile/tc187.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE UndecidableInstances, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-} -- UndecidableInstances now needed because the Coverage Condition fails diff --git a/testsuite/tests/typecheck/should_compile/tc192.hs b/testsuite/tests/typecheck/should_compile/tc192.hs index 5af64f344d..f015ede301 100644 --- a/testsuite/tests/typecheck/should_compile/tc192.hs +++ b/testsuite/tests/typecheck/should_compile/tc192.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE Arrows, CPP, TypeOperators #-} -- Test infix type notation and arrow notation diff --git a/testsuite/tests/typecheck/should_compile/tc203.hs b/testsuite/tests/typecheck/should_compile/tc203.hs index a2a361514a..adb9eed236 100644 --- a/testsuite/tests/typecheck/should_compile/tc203.hs +++ b/testsuite/tests/typecheck/should_compile/tc203.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes #-} -- Check that we can have a forall after a forall diff --git a/testsuite/tests/typecheck/should_compile/tc204.hs b/testsuite/tests/typecheck/should_compile/tc204.hs index d95fe86480..c7c5aa3787 100644 --- a/testsuite/tests/typecheck/should_compile/tc204.hs +++ b/testsuite/tests/typecheck/should_compile/tc204.hs @@ -1,19 +1,20 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# OPTIONS_GHC -dcore-lint #-} {-# LANGUAGE ImplicitParams #-} -{-# OPTIONS -dcore-lint #-}
-
--- The dict-bindings attached to an IPBinds
--- need not be in recursive order. This is
--- a long-standing bug, which lasted up to
--- and including GHC 6.4.2
-
-module Bug795(foo) where
-
-data Arg = E Integer | T Bool deriving (Eq, Show)
-
-foo :: Integer -> [Arg] -> IO String
-foo 1 as = do { let ?err = "my custom error"
- ; let ws = (show (firstE as))
- ; return (show (firstE as)) }
-
-firstE :: (?err :: String) => [Arg] -> Integer
-firstE = error "urk"
+ +-- The dict-bindings attached to an IPBinds +-- need not be in recursive order. This is +-- a long-standing bug, which lasted up to +-- and including GHC 6.4.2 + +module Bug795(foo) where + +data Arg = E Integer | T Bool deriving (Eq, Show) + +foo :: Integer -> [Arg] -> IO String +foo 1 as = do { let ?err = "my custom error" + ; let ws = (show (firstE as)) + ; return (show (firstE as)) } + +firstE :: (?err :: String) => [Arg] -> Integer +firstE = error "urk" diff --git a/testsuite/tests/typecheck/should_compile/tc206.hs b/testsuite/tests/typecheck/should_compile/tc206.hs index 68e751c0de..8764c24277 100644 --- a/testsuite/tests/typecheck/should_compile/tc206.hs +++ b/testsuite/tests/typecheck/should_compile/tc206.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes #-} -- This one showed up a bug in pre-subsumption diff --git a/testsuite/tests/typecheck/should_compile/tc208.hs b/testsuite/tests/typecheck/should_compile/tc208.hs index 0874d0249b..6fad1b21f4 100644 --- a/testsuite/tests/typecheck/should_compile/tc208.hs +++ b/testsuite/tests/typecheck/should_compile/tc208.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImplicitParams, RankNTypes #-} -- This program failed to typecheck in an early version of diff --git a/testsuite/tests/typecheck/should_compile/tc229.hs b/testsuite/tests/typecheck/should_compile/tc229.hs index 5c879fd89b..12b4a98060 100644 --- a/testsuite/tests/typecheck/should_compile/tc229.hs +++ b/testsuite/tests/typecheck/should_compile/tc229.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} -- trac #1406: Constraint doesn't reduce in the presence of quantified -- type variables diff --git a/testsuite/tests/typecheck/should_compile/tc230.hs b/testsuite/tests/typecheck/should_compile/tc230.hs index 22cb6e9621..0371ec904f 100644 --- a/testsuite/tests/typecheck/should_compile/tc230.hs +++ b/testsuite/tests/typecheck/should_compile/tc230.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImplicitParams, RankNTypes #-} -- Trac #1445 diff --git a/testsuite/tests/typecheck/should_compile/tc235.hs b/testsuite/tests/typecheck/should_compile/tc235.hs index 53822b3418..55a1a5855d 100644 --- a/testsuite/tests/typecheck/should_compile/tc235.hs +++ b/testsuite/tests/typecheck/should_compile/tc235.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies #-} diff --git a/testsuite/tests/typecheck/should_compile/tc237.hs b/testsuite/tests/typecheck/should_compile/tc237.hs index 0eacf2e854..70fcce7bf5 100644 --- a/testsuite/tests/typecheck/should_compile/tc237.hs +++ b/testsuite/tests/typecheck/should_compile/tc237.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, MultiParamTypeClasses, FunctionalDependencies #-} -- This one caught a bug in the implementation of functional diff --git a/testsuite/tests/typecheck/should_compile/tc239.hs b/testsuite/tests/typecheck/should_compile/tc239.hs index 81c39b790a..f3941d3427 100644 --- a/testsuite/tests/typecheck/should_compile/tc239.hs +++ b/testsuite/tests/typecheck/should_compile/tc239.hs @@ -1,11 +1,12 @@ --- Trac #1072
-
-module ShouldCompile where
-
-import Tc239_Help
-
-f1 :: Show a => WrapIO e a
-f1 = return undefined
-
-f2 :: Show a => WrapIO2 a
-f2 = f1
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +-- Trac #1072 + +module ShouldCompile where + +import Tc239_Help + +f1 :: Show a => WrapIO e a +f1 = return undefined + +f2 :: Show a => WrapIO2 a +f2 = f1 diff --git a/testsuite/tests/typecheck/should_compile/twins.hs b/testsuite/tests/typecheck/should_compile/twins.hs index 6e46f860db..f87b5a5ea3 100644 --- a/testsuite/tests/typecheck/should_compile/twins.hs +++ b/testsuite/tests/typecheck/should_compile/twins.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, LiberalTypeSynonyms #-} -- This test checks that deep skolemisation and deep diff --git a/testsuite/tests/typecheck/should_fail/T6161.stderr b/testsuite/tests/typecheck/should_fail/T6161.stderr index 78e16262c8..1293880281 100644 --- a/testsuite/tests/typecheck/should_fail/T6161.stderr +++ b/testsuite/tests/typecheck/should_fail/T6161.stderr @@ -1,5 +1,7 @@ -
-T6161.hs:19:10:
- No instance for (Super (Fam a))
- arising from the superclasses of an instance declaration
- In the instance declaration for ‘Duper (Fam a)’
+ +T6161.hs:19:10: + Could not deduce (Super (Fam a)) + arising from the superclasses of an instance declaration + from the context: Foo a + bound by the instance declaration at T6161.hs:19:10-31 + In the instance declaration for ‘Duper (Fam a)’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail017.stderr b/testsuite/tests/typecheck/should_fail/tcfail017.stderr index ce7613a29e..f09fc92eba 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail017.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail017.stderr @@ -1,5 +1,7 @@ -
-tcfail017.hs:10:10:
- No instance for (C [a])
- arising from the superclasses of an instance declaration
- In the instance declaration for ‘B [a]’
+ +tcfail017.hs:10:10: + Could not deduce (C [a]) + arising from the superclasses of an instance declaration + from the context: B a + bound by the instance declaration at tcfail017.hs:10:10-23 + In the instance declaration for ‘B [a]’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail020.stderr b/testsuite/tests/typecheck/should_fail/tcfail020.stderr index c55d1b5e88..d4163b1eaa 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail020.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail020.stderr @@ -1,5 +1,7 @@ -
-tcfail020.hs:10:10:
- No instance for (A [a])
- arising from the superclasses of an instance declaration
- In the instance declaration for ‘B [a]’
+ +tcfail020.hs:10:10: + Could not deduce (A [a]) + arising from the superclasses of an instance declaration + from the context: A a + bound by the instance declaration at tcfail020.hs:10:10-23 + In the instance declaration for ‘B [a]’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail071.hs b/testsuite/tests/typecheck/should_fail/tcfail071.hs index cbbd25070f..a4c63fac93 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail071.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail071.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} + -- !!! Mis-matched contexts in a mutually recursive group {- # LANGUAGE NoRelaxedPolyRec #-} diff --git a/testsuite/tests/typecheck/should_fail/tcfail138.hs b/testsuite/tests/typecheck/should_fail/tcfail138.hs index cf91a023f4..bc9992dc17 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail138.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail138.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-} -- UndecidableInstances because (L a b) is no smaller than (C a b) diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr index 04e7ec8d14..b36d7a8b37 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail143.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail143.stderr @@ -1,8 +1,8 @@ -
-tcfail143.hs:29:9:
- Couldn't match type ‘Z’ with ‘S Z’
- arising from a functional dependency between:
- constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’
- instance ‘MinMax Z b Z b’ at tcfail143.hs:12:10-23
- In the expression: n1 `extend` n0
- In an equation for ‘t2’: t2 = n1 `extend` n0
+ +tcfail143.hs:29:9: + Couldn't match type ‘S Z’ with ‘Z’ + arising from a functional dependency between: + constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’ + instance ‘MinMax a Z Z a’ at tcfail143.hs:11:10-23 + In the expression: n1 `extend` n0 + In an equation for ‘t2’: t2 = n1 `extend` n0 |