diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2021-03-10 15:28:48 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-10 16:58:50 -0500 |
commit | 115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2 (patch) | |
tree | 19214707fa15f127d05ae515c74cff7e85776a7c /testsuite/tests/typecheck | |
parent | 30ccf9ed1f592531dac9f3d750278fac6303c3e4 (diff) | |
download | haskell-115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2.tar.gz |
Use GHC2021 as default language
Diffstat (limited to 'testsuite/tests/typecheck')
162 files changed, 258 insertions, 164 deletions
diff --git a/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs b/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs index f1280205b2..fd37ede0db 100644 --- a/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs +++ b/testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, TypeFamilies, FlexibleInstances #-} {-# OPTIONS_GHC -Wno-missing-methods -Wno-unused-matches #-} diff --git a/testsuite/tests/typecheck/should_compile/SplitWD.hs b/testsuite/tests/typecheck/should_compile/SplitWD.hs index 5281cdbf0e..b0f37cc4b1 100644 --- a/testsuite/tests/typecheck/should_compile/SplitWD.hs +++ b/testsuite/tests/typecheck/should_compile/SplitWD.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ScopedTypeVariables, TypeOperators, DataKinds, PolyKinds, TypeFamilies, GADTs, StandaloneDeriving #-} diff --git a/testsuite/tests/typecheck/should_compile/T11524.hs b/testsuite/tests/typecheck/should_compile/T11524.hs index d6e2adf4f4..0856afe50b 100644 --- a/testsuite/tests/typecheck/should_compile/T11524.hs +++ b/testsuite/tests/typecheck/should_compile/T11524.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ExplicitForAll #-} diff --git a/testsuite/tests/typecheck/should_compile/T11811.hs b/testsuite/tests/typecheck/should_compile/T11811.hs index e3e0f810b3..5387ef62a5 100644 --- a/testsuite/tests/typecheck/should_compile/T11811.hs +++ b/testsuite/tests/typecheck/should_compile/T11811.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, GADTs #-} module T11811 where diff --git a/testsuite/tests/typecheck/should_compile/T12919.hs b/testsuite/tests/typecheck/should_compile/T12919.hs index 778abfa1e7..29eb9dc469 100644 --- a/testsuite/tests/typecheck/should_compile/T12919.hs +++ b/testsuite/tests/typecheck/should_compile/T12919.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, GADTs, ConstraintKinds #-} module T12919 where diff --git a/testsuite/tests/typecheck/should_compile/T13333.hs b/testsuite/tests/typecheck/should_compile/T13333.hs index 9a84e87265..843b3d8165 100644 --- a/testsuite/tests/typecheck/should_compile/T13333.hs +++ b/testsuite/tests/typecheck/should_compile/T13333.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} diff --git a/testsuite/tests/typecheck/should_compile/T13651.hs b/testsuite/tests/typecheck/should_compile/T13651.hs index 57e627aa71..a426cb5543 100644 --- a/testsuite/tests/typecheck/should_compile/T13651.hs +++ b/testsuite/tests/typecheck/should_compile/T13651.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-} module T13651 where diff --git a/testsuite/tests/typecheck/should_compile/T13651.stderr b/testsuite/tests/typecheck/should_compile/T13651.stderr index cc7af849d3..99d57d1c96 100644 --- a/testsuite/tests/typecheck/should_compile/T13651.stderr +++ b/testsuite/tests/typecheck/should_compile/T13651.stderr @@ -1,5 +1,5 @@ -T13651.hs:11:8: error: +T13651.hs:12:8: error: • Could not deduce: F cr (Bar h (Foo u)) ~ Bar h (Bar r u) from the context: (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) @@ -7,7 +7,7 @@ T13651.hs:11:8: error: foo :: forall cr cu h r u cs s. (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) => Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs) - at T13651.hs:(11,8)-(13,65) + at T13651.hs:(12,8)-(14,65) Expected: forall cr cu h r u cs s. (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) => Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs) diff --git a/testsuite/tests/typecheck/should_compile/T13651a.hs b/testsuite/tests/typecheck/should_compile/T13651a.hs index 482231b6f2..f08407b738 100644 --- a/testsuite/tests/typecheck/should_compile/T13651a.hs +++ b/testsuite/tests/typecheck/should_compile/T13651a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-} module T13651 where diff --git a/testsuite/tests/typecheck/should_compile/T13822.hs b/testsuite/tests/typecheck/should_compile/T13822.hs index 5c4d51382f..cd5ff23478 100644 --- a/testsuite/tests/typecheck/should_compile/T13822.hs +++ b/testsuite/tests/typecheck/should_compile/T13822.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators, PolyKinds, DataKinds, TypeFamilyDependencies, RankNTypes, LambdaCase, EmptyCase, UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_compile/T13871.hs b/testsuite/tests/typecheck/should_compile/T13871.hs index 623923eaca..fa233247ca 100644 --- a/testsuite/tests/typecheck/should_compile/T13871.hs +++ b/testsuite/tests/typecheck/should_compile/T13871.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/typecheck/should_compile/T13879.hs b/testsuite/tests/typecheck/should_compile/T13879.hs index 2e10c472fb..8a70565e7a 100644 --- a/testsuite/tests/typecheck/should_compile/T13879.hs +++ b/testsuite/tests/typecheck/should_compile/T13879.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} diff --git a/testsuite/tests/typecheck/should_compile/T14366.hs b/testsuite/tests/typecheck/should_compile/T14366.hs index 56abad5d30..9405c9b91b 100644 --- a/testsuite/tests/typecheck/should_compile/T14366.hs +++ b/testsuite/tests/typecheck/should_compile/T14366.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} diff --git a/testsuite/tests/typecheck/should_compile/T14451.hs b/testsuite/tests/typecheck/should_compile/T14451.hs index a67ce74537..40f03e3ece 100644 --- a/testsuite/tests/typecheck/should_compile/T14451.hs +++ b/testsuite/tests/typecheck/should_compile/T14451.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language KindSignatures, TypeOperators, PolyKinds, TypeOperators, ConstraintKinds, TypeFamilies, DataKinds, TypeInType, GADTs, AllowAmbiguousTypes, InstanceSigs, RankNTypes, UndecidableInstances #-} module T14451 where diff --git a/testsuite/tests/typecheck/should_compile/T14590.stderr b/testsuite/tests/typecheck/should_compile/T14590.stderr index 6f0ab068bc..4704a7aa01 100644 --- a/testsuite/tests/typecheck/should_compile/T14590.stderr +++ b/testsuite/tests/typecheck/should_compile/T14590.stderr @@ -1,5 +1,5 @@ -T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)] +T14590.hs:4:11: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int -> Int -> Int • In the expression: (x `_`) y In an equation for ‘f1’: f1 x y = (x `_`) y @@ -85,7 +85,7 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at T14590.hs:1:8-13 (and originally defined in ‘GHC.Base’)) -T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)] +T14590.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _a :: Int -> Int -> Int Or perhaps ‘_a’ is mis-spelled, or not in scope • In the expression: (x `_a`) y diff --git a/testsuite/tests/typecheck/should_compile/T14735.hs b/testsuite/tests/typecheck/should_compile/T14735.hs index c48231b7c2..0a00379b6b 100644 --- a/testsuite/tests/typecheck/should_compile/T14735.hs +++ b/testsuite/tests/typecheck/should_compile/T14735.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language QuantifiedConstraints #-} {-# Language StandaloneDeriving #-} {-# Language DataKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T14763.hs b/testsuite/tests/typecheck/should_compile/T14763.hs index c159291322..8bb451c7fe 100644 --- a/testsuite/tests/typecheck/should_compile/T14763.hs +++ b/testsuite/tests/typecheck/should_compile/T14763.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} diff --git a/testsuite/tests/typecheck/should_compile/T15079.hs b/testsuite/tests/typecheck/should_compile/T15079.hs index 62115182af..22e86abc56 100644 --- a/testsuite/tests/typecheck/should_compile/T15079.hs +++ b/testsuite/tests/typecheck/should_compile/T15079.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T17202.hs b/testsuite/tests/typecheck/should_compile/T17202.hs index 9f28ccc753..cda5783ec9 100644 --- a/testsuite/tests/typecheck/should_compile/T17202.hs +++ b/testsuite/tests/typecheck/should_compile/T17202.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE TypeFamilies #-} diff --git a/testsuite/tests/typecheck/should_compile/T17562b.hs b/testsuite/tests/typecheck/should_compile/T17562b.hs index 0d635d9248..b73e6b1bc7 100644 --- a/testsuite/tests/typecheck/should_compile/T17562b.hs +++ b/testsuite/tests/typecheck/should_compile/T17562b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints, MultiParamTypeClasses, TypeFamilies #-} -- NB: No PolyKinds diff --git a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs index 36a4bca1e5..d555511004 100644 --- a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs +++ b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints, DatatypeContexts, TypeFamilies #-} -- NB: -XNoPolyKinds, to get defaulting. diff --git a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr index 5e98268d8b..3975d2c54d 100644 --- a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr +++ b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr @@ -1,3 +1,3 @@ -T17567StupidThetaB.hs:1:37: warning: +T17567StupidThetaB.hs:2:37: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_compile/T4355.hs b/testsuite/tests/typecheck/should_compile/T4355.hs index 7e49dd8225..62ba16baa0 100644 --- a/testsuite/tests/typecheck/should_compile/T4355.hs +++ b/testsuite/tests/typecheck/should_compile/T4355.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints -fno-warn-missing-methods #-} {-# LANGUAGE DeriveDataTypeable, ExistentialQuantification, RankNTypes, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, PatternGuards, DatatypeContexts #-} diff --git a/testsuite/tests/typecheck/should_compile/T4355.stderr b/testsuite/tests/typecheck/should_compile/T4355.stderr index a977ce0190..77d919f992 100644 --- a/testsuite/tests/typecheck/should_compile/T4355.stderr +++ b/testsuite/tests/typecheck/should_compile/T4355.stderr @@ -1,3 +1,3 @@ -T4355.hs:2:172: Warning: +T4355.hs:3:172: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_compile/T4524.hs b/testsuite/tests/typecheck/should_compile/T4524.hs index fbdc0cd77c..9f86ecd00c 100644 --- a/testsuite/tests/typecheck/should_compile/T4524.hs +++ b/testsuite/tests/typecheck/should_compile/T4524.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE GADTs, diff --git a/testsuite/tests/typecheck/should_compile/T5490.hs b/testsuite/tests/typecheck/should_compile/T5490.hs index 5679ee9baa..487fe0d841 100644 --- a/testsuite/tests/typecheck/should_compile/T5490.hs +++ b/testsuite/tests/typecheck/should_compile/T5490.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} diff --git a/testsuite/tests/typecheck/should_compile/T5490.stderr b/testsuite/tests/typecheck/should_compile/T5490.stderr index 93ae57550f..bd54d9df94 100644 --- a/testsuite/tests/typecheck/should_compile/T5490.stderr +++ b/testsuite/tests/typecheck/should_compile/T5490.stderr @@ -1,4 +1,4 @@ -T5490.hs:295:5: warning: [-Woverlapping-patterns (in -Wdefault)] +T5490.hs:296:5: warning: [-Woverlapping-patterns (in -Wdefault)] Pattern match is redundant In a case alternative: _ -> ... diff --git a/testsuite/tests/typecheck/should_compile/T6018.hs b/testsuite/tests/typecheck/should_compile/T6018.hs index e8a194343b..f4b431cda4 100644 --- a/testsuite/tests/typecheck/should_compile/T6018.hs +++ b/testsuite/tests/typecheck/should_compile/T6018.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_compile/T6018.stderr b/testsuite/tests/typecheck/should_compile/T6018.stderr index c4baec422d..9423a0e706 100644 --- a/testsuite/tests/typecheck/should_compile/T6018.stderr +++ b/testsuite/tests/typecheck/should_compile/T6018.stderr @@ -2,10 +2,10 @@ [2 of 3] Compiling T6018a ( T6018a.hs, T6018a.o ) [3 of 3] Compiling T6018 ( T6018.hs, T6018.o ) -T6018.hs:108:5: warning: +T6018.hs:109:5: warning: Type family instance equation is overlapped: - Foo Bool = Bool -- Defined at T6018.hs:108:5 + Foo Bool = Bool -- Defined at T6018.hs:109:5 -T6018.hs:115:5: warning: +T6018.hs:116:5: warning: Type family instance equation is overlapped: - Bar Bool = Char -- Defined at T6018.hs:115:5 + Bar Bool = Char -- Defined at T6018.hs:116:5 diff --git a/testsuite/tests/typecheck/should_compile/T7503a.hs b/testsuite/tests/typecheck/should_compile/T7503a.hs index 61c0fb34e2..638265a8df 100644 --- a/testsuite/tests/typecheck/should_compile/T7503a.hs +++ b/testsuite/tests/typecheck/should_compile/T7503a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExistentialQuantification, DataKinds, PolyKinds, KindSignatures, GADTs #-} module T7503a where import Data.Kind diff --git a/testsuite/tests/typecheck/should_compile/T9151.hs b/testsuite/tests/typecheck/should_compile/T9151.hs index 351c563b67..c3546438d2 100644 --- a/testsuite/tests/typecheck/should_compile/T9151.hs +++ b/testsuite/tests/typecheck/should_compile/T9151.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, UndecidableInstances #-} module T9151 where diff --git a/testsuite/tests/typecheck/should_compile/Tc251_Help.hs b/testsuite/tests/typecheck/should_compile/Tc251_Help.hs index c4d29d45bc..57d86f83eb 100644 --- a/testsuite/tests/typecheck/should_compile/Tc251_Help.hs +++ b/testsuite/tests/typecheck/should_compile/Tc251_Help.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module Tc251_Help where diff --git a/testsuite/tests/typecheck/should_compile/Tc271.hs b/testsuite/tests/typecheck/should_compile/Tc271.hs index 5f0c3f0a1a..25971223f7 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271.hs +++ b/testsuite/tests/typecheck/should_compile/Tc271.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271 where import Tc271a diff --git a/testsuite/tests/typecheck/should_compile/Tc271.hs-boot b/testsuite/tests/typecheck/should_compile/Tc271.hs-boot index 9f15065a11..0e264a93f5 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271.hs-boot +++ b/testsuite/tests/typecheck/should_compile/Tc271.hs-boot @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271 where class K a where diff --git a/testsuite/tests/typecheck/should_compile/Tc271a.hs b/testsuite/tests/typecheck/should_compile/Tc271a.hs index b5fd136599..526b5482ee 100644 --- a/testsuite/tests/typecheck/should_compile/Tc271a.hs +++ b/testsuite/tests/typecheck/should_compile/Tc271a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module Tc271a where import {-# SOURCE #-} Tc271 diff --git a/testsuite/tests/typecheck/should_compile/tc146.hs b/testsuite/tests/typecheck/should_compile/tc146.hs index 5603c5ed78..61fac49197 100644 --- a/testsuite/tests/typecheck/should_compile/tc146.hs +++ b/testsuite/tests/typecheck/should_compile/tc146.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} -- The interesting thing about this one is that diff --git a/testsuite/tests/typecheck/should_compile/tc153.hs b/testsuite/tests/typecheck/should_compile/tc153.hs index a127cdcb8b..b255ac25c0 100644 --- a/testsuite/tests/typecheck/should_compile/tc153.hs +++ b/testsuite/tests/typecheck/should_compile/tc153.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- No ScopedTypeVariables, so (v::a) means (v:: forall a.a) module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc231.hs b/testsuite/tests/typecheck/should_compile/tc231.hs index a00f17cf83..9e91be3a6a 100644 --- a/testsuite/tests/typecheck/should_compile/tc231.hs +++ b/testsuite/tests/typecheck/should_compile/tc231.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -ddump-types -dsuppress-module-prefixes #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-} diff --git a/testsuite/tests/typecheck/should_compile/tc250.hs b/testsuite/tests/typecheck/should_compile/tc250.hs index 5d6e8beeb9..445d702b69 100644 --- a/testsuite/tests/typecheck/should_compile/tc250.hs +++ b/testsuite/tests/typecheck/should_compile/tc250.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc251.hs b/testsuite/tests/typecheck/should_compile/tc251.hs index bf9ef34787..e9315263af 100644 --- a/testsuite/tests/typecheck/should_compile/tc251.hs +++ b/testsuite/tests/typecheck/should_compile/tc251.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc252.hs b/testsuite/tests/typecheck/should_compile/tc252.hs index 215e1ff8cc..1ad9c7c514 100644 --- a/testsuite/tests/typecheck/should_compile/tc252.hs +++ b/testsuite/tests/typecheck/should_compile/tc252.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_compile/tc253.hs b/testsuite/tests/typecheck/should_compile/tc253.hs index 7a337ed639..7553b756a8 100644 --- a/testsuite/tests/typecheck/should_compile/tc253.hs +++ b/testsuite/tests/typecheck/should_compile/tc253.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- this is needed because |FamHelper a x| /< |Fam a x| diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs b/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs index 5db82037ba..c8e5966435 100644 --- a/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs +++ b/testsuite/tests/typecheck/should_fail/AssocTyDef02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module AssocTyDef02 where diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr index 79c3e86c67..b486676323 100644 --- a/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr +++ b/testsuite/tests/typecheck/should_fail/AssocTyDef02.stderr @@ -1,5 +1,5 @@ -AssocTyDef02.hs:6:5: error: +AssocTyDef02.hs:7:5: error: • Illegal argument ‘[b]’ in: ‘type Typ [b] = ...’ The arguments to ‘Typ’ must all be distinct type variables diff --git a/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs b/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs index 0a68a69a38..674de050d6 100644 --- a/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs +++ b/testsuite/tests/typecheck/should_fail/LevPolyBounded.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- inspired by comment:25 on #12708 {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr b/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr index c4c8d83a77..d5c20ed70f 100644 --- a/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr +++ b/testsuite/tests/typecheck/should_fail/LevPolyBounded.stderr @@ -1,16 +1,16 @@ -LevPolyBounded.hs:10:15: error: +LevPolyBounded.hs:11:15: error: • Expected a type, but ‘a’ has kind ‘TYPE r’ ‘r’ is a rigid type variable bound by the class declaration for ‘XBounded’ - at LevPolyBounded.hs:9:17-27 + at LevPolyBounded.hs:10:17-27 • In the type signature: LevPolyBounded.minBound :: a In the class declaration for ‘XBounded’ -LevPolyBounded.hs:11:15: error: +LevPolyBounded.hs:12:15: error: • Expected a type, but ‘a’ has kind ‘TYPE r’ ‘r’ is a rigid type variable bound by the class declaration for ‘XBounded’ - at LevPolyBounded.hs:9:17-27 + at LevPolyBounded.hs:10:17-27 • In the type signature: LevPolyBounded.maxBound :: a In the class declaration for ‘XBounded’ diff --git a/testsuite/tests/typecheck/should_fail/T10351.hs b/testsuite/tests/typecheck/should_fail/T10351.hs index 411698b397..6be96a2301 100644 --- a/testsuite/tests/typecheck/should_fail/T10351.hs +++ b/testsuite/tests/typecheck/should_fail/T10351.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T10351 where class C a where diff --git a/testsuite/tests/typecheck/should_fail/T10351.stderr b/testsuite/tests/typecheck/should_fail/T10351.stderr index bd28a5a3e1..22acdf50db 100644 --- a/testsuite/tests/typecheck/should_fail/T10351.stderr +++ b/testsuite/tests/typecheck/should_fail/T10351.stderr @@ -1,5 +1,5 @@ -T10351.hs:6:1: error: +T10351.hs:7:1: error: • Non type-variable argument in the constraint: C [a] (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T11563.hs b/testsuite/tests/typecheck/should_fail/T11563.hs index 83992da92b..5a04c84cf6 100644 --- a/testsuite/tests/typecheck/should_fail/T11563.hs +++ b/testsuite/tests/typecheck/should_fail/T11563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T11563 where data T a = MkT diff --git a/testsuite/tests/typecheck/should_fail/T11563.stderr b/testsuite/tests/typecheck/should_fail/T11563.stderr index 27eca84816..5ed6d3c799 100644 --- a/testsuite/tests/typecheck/should_fail/T11563.stderr +++ b/testsuite/tests/typecheck/should_fail/T11563.stderr @@ -1,5 +1,5 @@ -T11563.hs:5:19: error: +T11563.hs:6:19: error: • Expecting one more argument to ‘T’ Expected a type, but ‘T’ has kind ‘* -> *’ • In the first argument of ‘C’, namely ‘T’ diff --git a/testsuite/tests/typecheck/should_fail/T12083a.hs b/testsuite/tests/typecheck/should_fail/T12083a.hs index 0ca86f7222..9d5021387d 100644 --- a/testsuite/tests/typecheck/should_fail/T12083a.hs +++ b/testsuite/tests/typecheck/should_fail/T12083a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} module T12803a where diff --git a/testsuite/tests/typecheck/should_fail/T12083a.stderr b/testsuite/tests/typecheck/should_fail/T12083a.stderr index fe126f9f0b..05f1450008 100644 --- a/testsuite/tests/typecheck/should_fail/T12083a.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083a.stderr @@ -1,10 +1,10 @@ -T12083a.hs:5:1: error: +T12083a.hs:6:1: error: • Illegal qualified type: Num a => a Perhaps you intended to use RankNTypes • In the type synonym declaration for ‘Constrd’ -T12083a.hs:9:26: error: +T12083a.hs:10:26: error: • Data constructor ‘ExistentiallyLost’ has existential type variables, a context, or a specialised result type ExistentiallyLost :: forall u. TC u => u -> ExistentiallyLost (Enable ExistentialQuantification or GADTs to allow this) diff --git a/testsuite/tests/typecheck/should_fail/T12083b.hs b/testsuite/tests/typecheck/should_fail/T12083b.hs index 3992db3f9e..54985df32f 100644 --- a/testsuite/tests/typecheck/should_fail/T12083b.hs +++ b/testsuite/tests/typecheck/should_fail/T12083b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} module T12083b where diff --git a/testsuite/tests/typecheck/should_fail/T12083b.stderr b/testsuite/tests/typecheck/should_fail/T12083b.stderr index 87649ec4c3..98ff9bb6a0 100644 --- a/testsuite/tests/typecheck/should_fail/T12083b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083b.stderr @@ -1,5 +1,5 @@ -T12083b.hs:6:5: error: +T12083b.hs:7:5: error: • Illegal qualified type: Eq a => r Perhaps you intended to use RankNTypes • When checking the class method: diff --git a/testsuite/tests/typecheck/should_fail/T12430.hs b/testsuite/tests/typecheck/should_fail/T12430.hs index 03cded2b44..b5144604db 100644 --- a/testsuite/tests/typecheck/should_fail/T12430.hs +++ b/testsuite/tests/typecheck/should_fail/T12430.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilyDependencies #-} module T12430 where diff --git a/testsuite/tests/typecheck/should_fail/T12430.stderr b/testsuite/tests/typecheck/should_fail/T12430.stderr index fd73b40fc4..eab71af1fc 100644 --- a/testsuite/tests/typecheck/should_fail/T12430.stderr +++ b/testsuite/tests/typecheck/should_fail/T12430.stderr @@ -1,8 +1,8 @@ -T12430.hs:6:3: error: +T12430.hs:7:3: error: • Type family equation violates the family's injectivity annotation. Type variable ‘x’ cannot be inferred from the right-hand side. In the type family equation: - F x = C x -- Defined at T12430.hs:6:3 + F x = C x -- Defined at T12430.hs:7:3 • In the equations for closed type family ‘F’ In the type family declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T12563.hs b/testsuite/tests/typecheck/should_fail/T12563.hs index 394fa615d8..745f0b77dd 100644 --- a/testsuite/tests/typecheck/should_fail/T12563.hs +++ b/testsuite/tests/typecheck/should_fail/T12563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module T12563 where diff --git a/testsuite/tests/typecheck/should_fail/T12563.stderr b/testsuite/tests/typecheck/should_fail/T12563.stderr index f141a23e96..c5b8e1dc40 100644 --- a/testsuite/tests/typecheck/should_fail/T12563.stderr +++ b/testsuite/tests/typecheck/should_fail/T12563.stderr @@ -1,5 +1,5 @@ -T12563.hs:7:15: error: +T12563.hs:8:15: error: • Couldn't match expected type ‘(forall a. f0 a) -> f0 r0’ with actual type ‘p0’ Cannot instantiate unification variable ‘p0’ @@ -8,5 +8,5 @@ T12563.hs:7:15: error: In the expression: foo g In the expression: \ g -> foo g • Relevant bindings include - g :: p0 (bound at T12563.hs:7:6) - x :: p0 -> f0 r0 (bound at T12563.hs:7:1) + g :: p0 (bound at T12563.hs:8:6) + x :: p0 -> f0 r0 (bound at T12563.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/T12785b.hs b/testsuite/tests/typecheck/should_fail/T12785b.hs index 951b04c6cd..ccc53f6093 100644 --- a/testsuite/tests/typecheck/should_fail/T12785b.hs +++ b/testsuite/tests/typecheck/should_fail/T12785b.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, TypeOperators, ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds, GADTs #-} diff --git a/testsuite/tests/typecheck/should_fail/T12785b.stderr b/testsuite/tests/typecheck/should_fail/T12785b.stderr index 85d7361421..14ce110c0d 100644 --- a/testsuite/tests/typecheck/should_fail/T12785b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12785b.stderr @@ -1,5 +1,5 @@ -T12785b.hs:29:65: error: +T12785b.hs:30:65: error: • Could not deduce: Payload ('S n) (Payload n s1) ~ s arising from a use of ‘SBranchX’ from the context: m ~ 'S n @@ -7,13 +7,13 @@ T12785b.hs:29:65: error: Branch :: forall a (n :: Peano). a -> HTree n (HTree ('S n) a) -> HTree ('S n) a, in an equation for ‘nest’ - at T12785b.hs:29:7-51 + at T12785b.hs:30:7-51 ‘s’ is a rigid type variable bound by a pattern with constructor: Hide :: forall {a} (n :: Peano) (f :: a -> *) (s :: HTree n a). STree n f s -> Hidden n f, in an equation for ‘nest’ - at T12785b.hs:29:7-12 + at T12785b.hs:30:7-12 • In the second argument of ‘($)’, namely ‘a `SBranchX` tr’ In the expression: Hide $ a `SBranchX` tr In an equation for ‘nest’: @@ -21,7 +21,7 @@ T12785b.hs:29:65: error: = Hide $ a `SBranchX` tr • Relevant bindings include tr :: STree n (STree ('S n) (STree ('S ('S n)) f)) s1 - (bound at T12785b.hs:29:49) - a :: STree ('S m) f s (bound at T12785b.hs:29:12) + (bound at T12785b.hs:30:49) + a :: STree ('S m) f s (bound at T12785b.hs:30:12) nest :: HTree m (Hidden ('S m) f) -> Hidden m (STree ('S m) f) - (bound at T12785b.hs:27:1) + (bound at T12785b.hs:28:1) diff --git a/testsuite/tests/typecheck/should_fail/T14618.hs b/testsuite/tests/typecheck/should_fail/T14618.hs index da30d7ad85..e032b7b27c 100644 --- a/testsuite/tests/typecheck/should_fail/T14618.hs +++ b/testsuite/tests/typecheck/should_fail/T14618.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} module T14618 where diff --git a/testsuite/tests/typecheck/should_fail/T14618.stderr b/testsuite/tests/typecheck/should_fail/T14618.stderr index 2faf4a925b..c6fae3f81e 100644 --- a/testsuite/tests/typecheck/should_fail/T14618.stderr +++ b/testsuite/tests/typecheck/should_fail/T14618.stderr @@ -1,12 +1,12 @@ -T14618.hs:6:14: error: +T14618.hs:7:14: error: • Couldn't match type ‘b’ with ‘forall c. a’ Expected: a -> b Actual: a -> forall c. a ‘b’ is a rigid type variable bound by the type signature for: safeCoerce :: forall a b. a -> b - at T14618.hs:5:1-20 + at T14618.hs:6:1-20 • In the expression: f' In an equation for ‘safeCoerce’: safeCoerce @@ -16,4 +16,4 @@ T14618.hs:6:14: error: f x = x f' = f • Relevant bindings include - safeCoerce :: a -> b (bound at T14618.hs:6:1) + safeCoerce :: a -> b (bound at T14618.hs:7:1) diff --git a/testsuite/tests/typecheck/should_fail/T14904a.hs b/testsuite/tests/typecheck/should_fail/T14904a.hs index af4cf65a33..0043067e51 100644 --- a/testsuite/tests/typecheck/should_fail/T14904a.hs +++ b/testsuite/tests/typecheck/should_fail/T14904a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} diff --git a/testsuite/tests/typecheck/should_fail/T14904a.stderr b/testsuite/tests/typecheck/should_fail/T14904a.stderr index 3b8d005bab..1ed0946f6c 100644 --- a/testsuite/tests/typecheck/should_fail/T14904a.stderr +++ b/testsuite/tests/typecheck/should_fail/T14904a.stderr @@ -1,8 +1,8 @@ -T14904a.hs:9:6: error: +T14904a.hs:10:6: error: • Expected kind ‘forall (a :: k). g a’, but ‘f’ has kind ‘k1’ ‘k1’ is a rigid type variable bound by a family instance declaration - at T14904a.hs:9:3-30 + at T14904a.hs:10:3-30 • In the first argument of ‘F’, namely ‘(f :: forall a. g a)’ In the type family declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T15527.hs b/testsuite/tests/typecheck/should_fail/T15527.hs index b65c26ca7a..ad5271359a 100644 --- a/testsuite/tests/typecheck/should_fail/T15527.hs +++ b/testsuite/tests/typecheck/should_fail/T15527.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T15527 where f :: (Int -> Int) -> (Int -> Int) -> (Int -> Int) diff --git a/testsuite/tests/typecheck/should_fail/T15527.stderr b/testsuite/tests/typecheck/should_fail/T15527.stderr index 8908b17218..6729c26bd5 100644 --- a/testsuite/tests/typecheck/should_fail/T15527.stderr +++ b/testsuite/tests/typecheck/should_fail/T15527.stderr @@ -1,4 +1,4 @@ -T15527.hs:4:6: error: +T15527.hs:5:6: error: Illegal visible type application ‘@Int’ Perhaps you intended to use TypeApplications diff --git a/testsuite/tests/typecheck/should_fail/T15552a.hs b/testsuite/tests/typecheck/should_fail/T15552a.hs index 86c71dc9c0..67fa4dd741 100644 --- a/testsuite/tests/typecheck/should_fail/T15552a.hs +++ b/testsuite/tests/typecheck/should_fail/T15552a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, ExistentialQuantification, GADTs, PolyKinds, TypeOperators #-} {-# LANGUAGE TypeInType, TypeFamilies #-} {- # LANGUAGE UndecidableInstances #-} diff --git a/testsuite/tests/typecheck/should_fail/T15552a.stderr b/testsuite/tests/typecheck/should_fail/T15552a.stderr index 9f44248ae2..f7a6094d9e 100644 --- a/testsuite/tests/typecheck/should_fail/T15552a.stderr +++ b/testsuite/tests/typecheck/should_fail/T15552a.stderr @@ -1,22 +1,21 @@ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘GetEntryOfVal (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘EntryOfValKey (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ -T15552a.hs:25:9: error: +T15552a.hs:26:9: error: • Illegal nested type family application ‘EntryOfValKey (FirstEntryOfVal v kvs)’ (Use UndecidableInstances to permit this) • In the equations for closed type family ‘FirstEntryOfVal’ In the type family declaration for ‘FirstEntryOfVal’ - diff --git a/testsuite/tests/typecheck/should_fail/T15712.hs b/testsuite/tests/typecheck/should_fail/T15712.hs index a0b1d5f975..855e96a8f5 100644 --- a/testsuite/tests/typecheck/should_fail/T15712.hs +++ b/testsuite/tests/typecheck/should_fail/T15712.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# Language RankNTypes #-} {-# Language DerivingVia #-} {-# Language DeriveFunctor #-} diff --git a/testsuite/tests/typecheck/should_fail/T15712.stderr b/testsuite/tests/typecheck/should_fail/T15712.stderr index e8b5d397de..8031f5f0da 100644 --- a/testsuite/tests/typecheck/should_fail/T15712.stderr +++ b/testsuite/tests/typecheck/should_fail/T15712.stderr @@ -1,5 +1,5 @@ -T15712.hs:18:16: error: +T15712.hs:19:16: error: • Expecting one more argument to ‘GEndo’ Expected kind ‘* -> *’, but ‘GEndo’ has kind ‘(* -> *) -> * -> *’ • In the first argument of ‘Codensity’, namely ‘GEndo’ diff --git a/testsuite/tests/typecheck/should_fail/T16059c.hs b/testsuite/tests/typecheck/should_fail/T16059c.hs index d26c7db6d4..6e705113e9 100644 --- a/testsuite/tests/typecheck/should_fail/T16059c.hs +++ b/testsuite/tests/typecheck/should_fail/T16059c.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T16059c where import T16059b diff --git a/testsuite/tests/typecheck/should_fail/T16059c.stderr b/testsuite/tests/typecheck/should_fail/T16059c.stderr index 6c6113fb5f..873b7088bf 100644 --- a/testsuite/tests/typecheck/should_fail/T16059c.stderr +++ b/testsuite/tests/typecheck/should_fail/T16059c.stderr @@ -1,5 +1,5 @@ -T16059c.hs:5:6: error: +T16059c.hs:6:6: error: • Illegal polymorphic type: forall a1. a1 Perhaps you intended to use RankNTypes • In the expansion of type synonym ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/T16059e.hs b/testsuite/tests/typecheck/should_fail/T16059e.hs index 4747edc302..ba4bff5f8c 100644 --- a/testsuite/tests/typecheck/should_fail/T16059e.hs +++ b/testsuite/tests/typecheck/should_fail/T16059e.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T16059e where import T16059b diff --git a/testsuite/tests/typecheck/should_fail/T16059e.stderr b/testsuite/tests/typecheck/should_fail/T16059e.stderr index f5a6bb00ba..582d5fbe62 100644 --- a/testsuite/tests/typecheck/should_fail/T16059e.stderr +++ b/testsuite/tests/typecheck/should_fail/T16059e.stderr @@ -1,5 +1,5 @@ -T16059e.hs:14:6: error: +T16059e.hs:15:6: error: • Illegal polymorphic type: forall a. a Perhaps you intended to use RankNTypes • In the expansion of type synonym ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/T16255.hs b/testsuite/tests/typecheck/should_fail/T16255.hs index ef2f0a9cb6..2f20d4c788 100644 --- a/testsuite/tests/typecheck/should_fail/T16255.hs +++ b/testsuite/tests/typecheck/should_fail/T16255.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} diff --git a/testsuite/tests/typecheck/should_fail/T16255.stderr b/testsuite/tests/typecheck/should_fail/T16255.stderr index 74379a316c..ba23f0e466 100644 --- a/testsuite/tests/typecheck/should_fail/T16255.stderr +++ b/testsuite/tests/typecheck/should_fail/T16255.stderr @@ -1,10 +1,10 @@ -T16255.hs:13:3: error: +T16255.hs:14:3: error: • Illegal oversaturated visible kind argument: ‘@Bool’ • In the equations for closed type family ‘F1’ In the type family declaration for ‘F1’ -T16255.hs:21:3: error: +T16255.hs:22:3: error: • Illegal oversaturated visible kind argument: ‘@Symbol’ • In the equations for closed type family ‘F2’ In the type family declaration for ‘F2’ diff --git a/testsuite/tests/typecheck/should_fail/T16414.hs b/testsuite/tests/typecheck/should_fail/T16414.hs index 27807e82bf..592aa7de3c 100644 --- a/testsuite/tests/typecheck/should_fail/T16414.hs +++ b/testsuite/tests/typecheck/should_fail/T16414.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, AllowAmbiguousTypes #-} {-# LANGUAGE UndecidableSuperClasses #-} module T16414 where diff --git a/testsuite/tests/typecheck/should_fail/T16414.stderr b/testsuite/tests/typecheck/should_fail/T16414.stderr index 5cfbf7549a..601f4097db 100644 --- a/testsuite/tests/typecheck/should_fail/T16414.stderr +++ b/testsuite/tests/typecheck/should_fail/T16414.stderr @@ -1,13 +1,13 @@ -T16414.hs:14:6: error: +T16414.hs:15:6: error: • Overlapping instances for AllZip2 f0 arising from a use of ‘f2’ Matching givens (or their superclasses): AllZip2 I bound by the type signature for: f1 :: forall x. (All x, AllZip2 I) => x -> () - at T16414.hs:13:1-35 + at T16414.hs:14:1-35 Matching instances: - instance AllZip2 f -- Defined at T16414.hs:11:10 + instance AllZip2 f -- Defined at T16414.hs:12:10 (The choice depends on the instantiation of ‘f0’) • In the expression: f2 In an equation for ‘f1’: f1 = f2 diff --git a/testsuite/tests/typecheck/should_fail/T16502.hs b/testsuite/tests/typecheck/should_fail/T16502.hs index 5fac062d85..c5ddea3938 100644 --- a/testsuite/tests/typecheck/should_fail/T16502.hs +++ b/testsuite/tests/typecheck/should_fail/T16502.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} diff --git a/testsuite/tests/typecheck/should_fail/T17213.hs b/testsuite/tests/typecheck/should_fail/T17213.hs index e9c093c903..8f35d459f5 100644 --- a/testsuite/tests/typecheck/should_fail/T17213.hs +++ b/testsuite/tests/typecheck/should_fail/T17213.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T17213 where import T17213a diff --git a/testsuite/tests/typecheck/should_fail/T17213.stderr b/testsuite/tests/typecheck/should_fail/T17213.stderr index 1172992660..ff73505d26 100644 --- a/testsuite/tests/typecheck/should_fail/T17213.stderr +++ b/testsuite/tests/typecheck/should_fail/T17213.stderr @@ -1,5 +1,5 @@ -T17213.hs:5:1: error: +T17213.hs:6:1: error: • Illegal polymorphic type: forall a. a -> a Perhaps you intended to use RankNTypes • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T17563.hs b/testsuite/tests/typecheck/should_fail/T17563.hs index cab972a1bf..565cd9f59e 100644 --- a/testsuite/tests/typecheck/should_fail/T17563.hs +++ b/testsuite/tests/typecheck/should_fail/T17563.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE QuantifiedConstraints #-} module T17563 where diff --git a/testsuite/tests/typecheck/should_fail/T17563.stderr b/testsuite/tests/typecheck/should_fail/T17563.stderr index c24587c1a6..5b46701859 100644 --- a/testsuite/tests/typecheck/should_fail/T17563.stderr +++ b/testsuite/tests/typecheck/should_fail/T17563.stderr @@ -1,5 +1,5 @@ -T17563.hs:5:9: error: +T17563.hs:6:9: error: • Illegal equational constraint a b ~ a c (Use GADTs or TypeFamilies to permit this) • In the quantified constraint ‘forall (a :: * -> *). a b ~ a c’ diff --git a/testsuite/tests/typecheck/should_fail/T18939_Fail.hs b/testsuite/tests/typecheck/should_fail/T18939_Fail.hs index c2faade865..04ceec1e2a 100644 --- a/testsuite/tests/typecheck/should_fail/T18939_Fail.hs +++ b/testsuite/tests/typecheck/should_fail/T18939_Fail.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE PolyKinds #-} module T18939_Fail where diff --git a/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr b/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr index 2cdbab4bb3..eb9bb6c5fd 100644 --- a/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr +++ b/testsuite/tests/typecheck/should_fail/T18939_Fail.stderr @@ -1,5 +1,5 @@ -T18939_Fail.hs:5:1: error: +T18939_Fail.hs:6:1: error: • Illegal polymorphic type: forall a -> a Perhaps you intended to use RankNTypes • In the data type declaration for ‘F’ diff --git a/testsuite/tests/typecheck/should_fail/T19109.hs b/testsuite/tests/typecheck/should_fail/T19109.hs index 614f883b52..d1037260c8 100644 --- a/testsuite/tests/typecheck/should_fail/T19109.hs +++ b/testsuite/tests/typecheck/should_fail/T19109.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T19109 where import Data.Functor.Identity diff --git a/testsuite/tests/typecheck/should_fail/T19109.stderr b/testsuite/tests/typecheck/should_fail/T19109.stderr index 25ce535835..83f60680da 100644 --- a/testsuite/tests/typecheck/should_fail/T19109.stderr +++ b/testsuite/tests/typecheck/should_fail/T19109.stderr @@ -1,4 +1,4 @@ -T19109.hs:5:4: error: +T19109.hs:6:4: error: Illegal visible type application in a pattern: ‘@Int’ Both ScopedTypeVariables and TypeApplications are required to use this feature diff --git a/testsuite/tests/typecheck/should_fail/T19187.hs b/testsuite/tests/typecheck/should_fail/T19187.hs index 52f0e11c69..8ced67e5f4 100644 --- a/testsuite/tests/typecheck/should_fail/T19187.hs +++ b/testsuite/tests/typecheck/should_fail/T19187.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances #-} module T19187 where diff --git a/testsuite/tests/typecheck/should_fail/T19187.stderr b/testsuite/tests/typecheck/should_fail/T19187.stderr index 637cd22c4d..45cc96833a 100644 --- a/testsuite/tests/typecheck/should_fail/T19187.stderr +++ b/testsuite/tests/typecheck/should_fail/T19187.stderr @@ -1,5 +1,5 @@ -T19187.hs:7:10: error: +T19187.hs:8:10: error: • Non type-variable argument in the constraint: Eq Int (Use FlexibleContexts to permit this) • In the instance declaration for ‘Eq T’ diff --git a/testsuite/tests/typecheck/should_fail/T2247.hs b/testsuite/tests/typecheck/should_fail/T2247.hs index 3779f2db76..9fdd92c258 100644 --- a/testsuite/tests/typecheck/should_fail/T2247.hs +++ b/testsuite/tests/typecheck/should_fail/T2247.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses, UndecidableInstances, FlexibleInstances #-} module T2247 where diff --git a/testsuite/tests/typecheck/should_fail/T2247.stderr b/testsuite/tests/typecheck/should_fail/T2247.stderr index 54a6c2a23d..8335fb0033 100644 --- a/testsuite/tests/typecheck/should_fail/T2247.stderr +++ b/testsuite/tests/typecheck/should_fail/T2247.stderr @@ -1,8 +1,8 @@ -T2247.hs:6:10: error: - Illegal instance declaration for ‘FD a b’ - The liberal coverage condition fails in class ‘FD’ - for functional dependency: ‘a -> b’ - Reason: lhs type ‘a’ does not determine rhs type ‘b’ - Un-determined variable: b - In the instance declaration for ‘FD a b’ +T2247.hs:7:10: error: + • Illegal instance declaration for ‘FD a b’ + The liberal coverage condition fails in class ‘FD’ + for functional dependency: ‘a -> b’ + Reason: lhs type ‘a’ does not determine rhs type ‘b’ + Un-determined variable: b + • In the instance declaration for ‘FD a b’ diff --git a/testsuite/tests/typecheck/should_fail/T2538.hs b/testsuite/tests/typecheck/should_fail/T2538.hs index 849256ad3a..6f76293d76 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.hs +++ b/testsuite/tests/typecheck/should_fail/T2538.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- #2538 module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr index 726ac8fd71..768ad65fa3 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.stderr +++ b/testsuite/tests/typecheck/should_fail/T2538.stderr @@ -1,15 +1,15 @@ -T2538.hs:6:6: error: +T2538.hs:7:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use RankNTypes • In the type signature: f :: (Eq a => a -> a) -> Int -T2538.hs:9:6: error: +T2538.hs:10:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use ImpredicativeTypes • In the type signature: g :: [Eq a => a -> a] -> Int -T2538.hs:12:6: error: +T2538.hs:13:6: error: • Illegal qualified type: Eq a => a -> a Perhaps you intended to use ImpredicativeTypes • In the type signature: h :: Ix (Eq a => a -> a) => Int diff --git a/testsuite/tests/typecheck/should_fail/T2994.hs b/testsuite/tests/typecheck/should_fail/T2994.hs index aed2c4aa21..6a79e0ef97 100644 --- a/testsuite/tests/typecheck/should_fail/T2994.hs +++ b/testsuite/tests/typecheck/should_fail/T2994.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} -- #2994 diff --git a/testsuite/tests/typecheck/should_fail/T2994.stderr b/testsuite/tests/typecheck/should_fail/T2994.stderr index 7f20acf5aa..a3ae3bc4d2 100644 --- a/testsuite/tests/typecheck/should_fail/T2994.stderr +++ b/testsuite/tests/typecheck/should_fail/T2994.stderr @@ -1,23 +1,23 @@ -T2994.hs:11:10: error: +T2994.hs:12:10: error: • Expecting one more argument to ‘MonadReader Int’ Expected a constraint, but ‘MonadReader Int’ has kind ‘* -> Constraint’ • In the instance declaration for ‘MonadReader Int’ -T2994.hs:13:10: error: +T2994.hs:14:10: error: • Expecting one more argument to ‘MonadReader (Reader' r)’ Expected a constraint, but ‘MonadReader (Reader' r)’ has kind ‘* -> Constraint’ • In the instance declaration for ‘MonadReader (Reader' r)’ -T2994.hs:13:23: error: +T2994.hs:14:23: error: • Expecting one more argument to ‘Reader' r’ Expected a type, but ‘Reader' r’ has kind ‘* -> *’ • In the first argument of ‘MonadReader’, namely ‘(Reader' r)’ In the instance declaration for ‘MonadReader (Reader' r)’ -T2994.hs:15:10: error: +T2994.hs:16:10: error: • Expected kind ‘(* -> *) -> Constraint’, but ‘MonadReader r r’ has kind ‘Constraint’ • In the instance declaration for ‘MonadReader r r (Reader' r)’ diff --git a/testsuite/tests/typecheck/should_fail/T3155.hs b/testsuite/tests/typecheck/should_fail/T3155.hs index 81f8c7d139..129885f438 100644 --- a/testsuite/tests/typecheck/should_fail/T3155.hs +++ b/testsuite/tests/typecheck/should_fail/T3155.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs, TypeOperators #-} module T3155 where diff --git a/testsuite/tests/typecheck/should_fail/T3155.stderr b/testsuite/tests/typecheck/should_fail/T3155.stderr index 0f04d76bff..e82803fd22 100644 --- a/testsuite/tests/typecheck/should_fail/T3155.stderr +++ b/testsuite/tests/typecheck/should_fail/T3155.stderr @@ -1,5 +1,5 @@ -T3155.hs:13:9: error: +T3155.hs:14:9: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/T3468.hs b/testsuite/tests/typecheck/should_fail/T3468.hs index 4c4bf975bc..f091f09b2c 100644 --- a/testsuite/tests/typecheck/should_fail/T3468.hs +++ b/testsuite/tests/typecheck/should_fail/T3468.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExistentialQuantification #-} module T3468 where diff --git a/testsuite/tests/typecheck/should_fail/T3950.hs b/testsuite/tests/typecheck/should_fail/T3950.hs index 1a3bcc1d31..ca78ab68ea 100644 --- a/testsuite/tests/typecheck/should_fail/T3950.hs +++ b/testsuite/tests/typecheck/should_fail/T3950.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE GADTs #-} module T3950 where diff --git a/testsuite/tests/typecheck/should_fail/T3950.stderr b/testsuite/tests/typecheck/should_fail/T3950.stderr index 69ff276479..16fde0e488 100644 --- a/testsuite/tests/typecheck/should_fail/T3950.stderr +++ b/testsuite/tests/typecheck/should_fail/T3950.stderr @@ -1,5 +1,5 @@ -T3950.hs:15:13: error: +T3950.hs:16:13: error: • Couldn't match kind ‘*’ with ‘* -> *’ When matching types w :: (* -> * -> *) -> * @@ -15,4 +15,4 @@ T3950.hs:15:13: error: rp' :: Sealed (Id p x) rp' = undefined • Relevant bindings include - rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1) + rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:16:1) diff --git a/testsuite/tests/typecheck/should_fail/T5300.hs b/testsuite/tests/typecheck/should_fail/T5300.hs index b15713d290..e200ca0c24 100644 --- a/testsuite/tests/typecheck/should_fail/T5300.hs +++ b/testsuite/tests/typecheck/should_fail/T5300.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-} module T5300 where diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr index a80839455e..06d870dff3 100644 --- a/testsuite/tests/typecheck/should_fail/T5300.stderr +++ b/testsuite/tests/typecheck/should_fail/T5300.stderr @@ -1,26 +1,26 @@ -T5300.hs:11:7: error: +T5300.hs:12:7: error: • Could not deduce (C1 a b c0) from the context: (Monad m, C1 a b c) bound by the type signature for: f1 :: forall (m :: * -> *) a b c. (Monad m, C1 a b c) => a -> StateT (T b) m a - at T5300.hs:11:7-50 + at T5300.hs:12:7-50 The type variable ‘c0’ is ambiguous • In the ambiguity check for ‘f1’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature: f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a -T5300.hs:14:7: error: +T5300.hs:15:7: error: • Could not deduce (C1 a1 b1 c10) from the context: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) bound by the type signature for: f2 :: forall (m :: * -> *) a1 b1 c1 a2 b2 c2. (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => a1 -> StateT (T b2) m a2 - at T5300.hs:14:7-69 + at T5300.hs:15:7-69 The type variable ‘c10’ is ambiguous • In the ambiguity check for ‘f2’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/T5957.hs b/testsuite/tests/typecheck/should_fail/T5957.hs index c168a00f3a..badb4309a1 100644 --- a/testsuite/tests/typecheck/should_fail/T5957.hs +++ b/testsuite/tests/typecheck/should_fail/T5957.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T5957 where flex :: Int -> Show a => a -> String diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr index 66bc0c1d0d..05a7316915 100644 --- a/testsuite/tests/typecheck/should_fail/T5957.stderr +++ b/testsuite/tests/typecheck/should_fail/T5957.stderr @@ -1,6 +1,5 @@ -T5957.hs:3:9: error: +T5957.hs:4:9: error: • Illegal qualified type: Show a => a -> String Perhaps you intended to use RankNTypes - • In the type signature: - flex :: Int -> Show a => a -> String + • In the type signature: flex :: Int -> Show a => a -> String diff --git a/testsuite/tests/typecheck/should_fail/T6022.hs b/testsuite/tests/typecheck/should_fail/T6022.hs index 994b779626..de4adb5ff9 100644 --- a/testsuite/tests/typecheck/should_fail/T6022.hs +++ b/testsuite/tests/typecheck/should_fail/T6022.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module T6022 where f x = x == head diff --git a/testsuite/tests/typecheck/should_fail/T6022.stderr b/testsuite/tests/typecheck/should_fail/T6022.stderr index 6423925b12..9f4bc91622 100644 --- a/testsuite/tests/typecheck/should_fail/T6022.stderr +++ b/testsuite/tests/typecheck/should_fail/T6022.stderr @@ -1,5 +1,5 @@ -T6022.hs:3:1: error: +T6022.hs:4:1: error: • Non type-variable argument in the constraint: Eq ([a] -> a) (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T6069.stderr b/testsuite/tests/typecheck/should_fail/T6069.stderr index 98b0587bbc..0456a84280 100644 --- a/testsuite/tests/typecheck/should_fail/T6069.stderr +++ b/testsuite/tests/typecheck/should_fail/T6069.stderr @@ -23,5 +23,5 @@ T6069.hs:15:16: error: Expected: ST s2 Int -> b2 Actual: (forall s. ST s b2) -> b2 • In the second argument of ‘(.)’, namely ‘runST’ - In the first argument of ‘($)’, namely ‘(print . runST)’ + In the expression: print . runST In the expression: ((print . runST) $) fourty_two diff --git a/testsuite/tests/typecheck/should_fail/T8034.hs b/testsuite/tests/typecheck/should_fail/T8034.hs index e432152e08..c696f68e57 100644 --- a/testsuite/tests/typecheck/should_fail/T8034.hs +++ b/testsuite/tests/typecheck/should_fail/T8034.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module T8034 where diff --git a/testsuite/tests/typecheck/should_fail/T8034.stderr b/testsuite/tests/typecheck/should_fail/T8034.stderr index 8f64538554..05f2ca42a3 100644 --- a/testsuite/tests/typecheck/should_fail/T8034.stderr +++ b/testsuite/tests/typecheck/should_fail/T8034.stderr @@ -1,5 +1,5 @@ -T8034.hs:6:3: error: +T8034.hs:7:3: error: • Couldn't match type: F a0 with: F a Expected: F a -> F a diff --git a/testsuite/tests/typecheck/should_fail/T8883.hs b/testsuite/tests/typecheck/should_fail/T8883.hs index c3af3af513..d2d5c1eca6 100644 --- a/testsuite/tests/typecheck/should_fail/T8883.hs +++ b/testsuite/tests/typecheck/should_fail/T8883.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} -- #8883 diff --git a/testsuite/tests/typecheck/should_fail/T8883.stderr b/testsuite/tests/typecheck/should_fail/T8883.stderr index c56c434c4c..6febdaa2b9 100644 --- a/testsuite/tests/typecheck/should_fail/T8883.stderr +++ b/testsuite/tests/typecheck/should_fail/T8883.stderr @@ -1,5 +1,5 @@ -T8883.hs:20:1: error: +T8883.hs:21:1: error: • Non type-variable argument in the constraint: Functor (PF a) (Use FlexibleContexts to permit this) • When checking the inferred type diff --git a/testsuite/tests/typecheck/should_fail/T9201.hs b/testsuite/tests/typecheck/should_fail/T9201.hs index 7702fa369c..b041628805 100644 --- a/testsuite/tests/typecheck/should_fail/T9201.hs +++ b/testsuite/tests/typecheck/should_fail/T9201.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE PolyKinds, FunctionalDependencies, MultiParamTypeClasses #-} module T9201 where diff --git a/testsuite/tests/typecheck/should_fail/T9201.stderr b/testsuite/tests/typecheck/should_fail/T9201.stderr index ad873a0d0a..f0901b4d56 100644 --- a/testsuite/tests/typecheck/should_fail/T9201.stderr +++ b/testsuite/tests/typecheck/should_fail/T9201.stderr @@ -1,12 +1,12 @@ -T9201.hs:6:17: error: +T9201.hs:7:17: error: • Expected kind ‘x’, but ‘a’ has kind ‘y’ ‘y’ is a rigid type variable bound by the class declaration for ‘MonoidalCCC’ - at T9201.hs:5:20-49 + at T9201.hs:6:20-49 ‘x’ is a rigid type variable bound by the class declaration for ‘MonoidalCCC’ - at T9201.hs:5:20-49 + at T9201.hs:6:20-49 • In the first argument of ‘f’, namely ‘a’ In the second argument of ‘d’, namely ‘(f a)’ In the type signature: ret :: d a (f a) diff --git a/testsuite/tests/typecheck/should_fail/T9858a.hs b/testsuite/tests/typecheck/should_fail/T9858a.hs index b9cbf8fa1a..c61b29baee 100644 --- a/testsuite/tests/typecheck/should_fail/T9858a.hs +++ b/testsuite/tests/typecheck/should_fail/T9858a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- From comment:76 in #9858 -- This exploit still works in GHC 7.10.1. -- By Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn diff --git a/testsuite/tests/typecheck/should_fail/T9858a.stderr b/testsuite/tests/typecheck/should_fail/T9858a.stderr index fcf76ef247..b179fcf595 100644 --- a/testsuite/tests/typecheck/should_fail/T9858a.stderr +++ b/testsuite/tests/typecheck/should_fail/T9858a.stderr @@ -1,5 +1,5 @@ -T9858a.hs:20:18: error: +T9858a.hs:21:18: error: • Illegal qualified type: (() :: Constraint, () :: Constraint) => () • In the expansion of type synonym ‘PX’ diff --git a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs index de5e4436f7..2928f5ccf5 100644 --- a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs +++ b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module NoNullaryTC where class A where diff --git a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr index e41b8aa1bd..15c9cd2ab6 100644 --- a/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr +++ b/testsuite/tests/typecheck/should_fail/TcNoNullaryTC.stderr @@ -1,5 +1,5 @@ -TcNoNullaryTC.hs:3:1: error: +TcNoNullaryTC.hs:4:1: error: • No parameters for class ‘A’ (Enable MultiParamTypeClasses to allow no-parameter classes) • In the class declaration for ‘A’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail044.hs b/testsuite/tests/typecheck/should_fail/tcfail044.hs index b271d0f977..09d756693f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail044.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail044.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- !!! tcfail044: duplicated type variable in instance decls -- module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail044.stderr b/testsuite/tests/typecheck/should_fail/tcfail044.stderr index 9733cc4fc8..a83ae86d81 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail044.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail044.stderr @@ -1,16 +1,16 @@ -tcfail044.hs:5:20: - Illegal instance declaration for ‘Eq (a -> a)’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Eq (a -> a)’ +tcfail044.hs:6:20: error: + • Illegal instance declaration for ‘Eq (a -> a)’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Eq (a -> a)’ -tcfail044.hs:8:21: - Illegal instance declaration for ‘Num (a -> a)’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘Num (a -> a)’ +tcfail044.hs:9:21: error: + • Illegal instance declaration for ‘Num (a -> a)’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘Num (a -> a)’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail047.hs b/testsuite/tests/typecheck/should_fail/tcfail047.hs index f3cdb19741..7c31e33197 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail047.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail047.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where class A a where diff --git a/testsuite/tests/typecheck/should_fail/tcfail047.stderr b/testsuite/tests/typecheck/should_fail/tcfail047.stderr index 53eb4defdd..c1c0dca619 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail047.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail047.stderr @@ -1,8 +1,8 @@ -tcfail047.hs:6:10: - Illegal instance declaration for ‘A (a, (b, c))’ - (All instance types must be of the form (T a1 ... an) - where a1 ... an are *distinct type variables*, - and each type variable appears at most once in the instance head. - Use FlexibleInstances if you want to disable this.) - In the instance declaration for ‘A (a, (b, c))’ +tcfail047.hs:7:10: error: + • Illegal instance declaration for ‘A (a, (b, c))’ + (All instance types must be of the form (T a1 ... an) + where a1 ... an are *distinct type variables*, + and each type variable appears at most once in the instance head. + Use FlexibleInstances if you want to disable this.) + • In the instance declaration for ‘A (a, (b, c))’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.hs b/testsuite/tests/typecheck/should_fail/tcfail076.hs index fc4fc011d4..384b6d2560 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail076.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail076.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} {- diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.stderr b/testsuite/tests/typecheck/should_fail/tcfail076.stderr index 47432ae851..c45eed328e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr @@ -1,19 +1,19 @@ -tcfail076.hs:18:82: error: +tcfail076.hs:19:82: error: • Couldn't match type ‘res1’ with ‘res’ Expected: m res1 Actual: m res ‘res1’ is a rigid type variable bound by a type expected by the context: forall res1. (b -> m res1) -> m res1 - at tcfail076.hs:18:71-88 + at tcfail076.hs:19:71-88 ‘res’ is a rigid type variable bound by a type expected by the context: forall res. (a -> m res) -> m res - at tcfail076.hs:18:35-96 + at tcfail076.hs:19:35-96 • In the expression: cont a In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’ In the expression: KContT (\ cont' -> cont a) • Relevant bindings include - cont' :: b -> m res1 (bound at tcfail076.hs:18:73) - cont :: a -> m res (bound at tcfail076.hs:18:37) + cont' :: b -> m res1 (bound at tcfail076.hs:19:73) + cont :: a -> m res (bound at tcfail076.hs:19:37) diff --git a/testsuite/tests/typecheck/should_fail/tcfail098.hs b/testsuite/tests/typecheck/should_fail/tcfail098.hs index 159e9c8081..c1c7e93f1e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail098.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail098.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail098.stderr b/testsuite/tests/typecheck/should_fail/tcfail098.stderr index 503c3e3898..a0c2735c26 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail098.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail098.stderr @@ -1,10 +1,10 @@ -tcfail098.hs:12:10: error: +tcfail098.hs:13:10: error: • Could not deduce (Bar a0) from the context: Bar a bound by an instance declaration: forall a. Bar a => Bar Bool - at tcfail098.hs:12:10-26 + at tcfail098.hs:13:10-26 The type variable ‘a0’ is ambiguous • In the ambiguity check for an instance declaration To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail116.hs b/testsuite/tests/typecheck/should_fail/tcfail116.hs index 1c32c956d3..656ffac4e2 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail116.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail116.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- in Haskell 98, methods must mention the class variable diff --git a/testsuite/tests/typecheck/should_fail/tcfail116.stderr b/testsuite/tests/typecheck/should_fail/tcfail116.stderr index 952512686e..83a76daf30 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail116.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail116.stderr @@ -1,10 +1,10 @@ -tcfail116.hs:6:5: error: +tcfail116.hs:7:5: error: • Could not deduce (Foo a0) from the context: Foo a bound by the type signature for: bug :: forall a. Foo a => () - at tcfail116.hs:6:5-13 + at tcfail116.hs:7:5-13 The type variable ‘a0’ is ambiguous • In the ambiguity check for ‘bug’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail117.hs b/testsuite/tests/typecheck/should_fail/tcfail117.hs index 2a5ae99172..4afc0f527e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail117.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail117.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- Without any extensions enabled both of these should fail diff --git a/testsuite/tests/typecheck/should_fail/tcfail117.stderr b/testsuite/tests/typecheck/should_fail/tcfail117.stderr index e35a2581c8..41caeaea92 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail117.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail117.stderr @@ -1,13 +1,13 @@ -tcfail117.hs:5:32: - Can't make a derived instance of ‘Enum N1’: - ‘N1’ must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension - In the newtype declaration for ‘N1’ +tcfail117.hs:6:32: error: + • Can't make a derived instance of ‘Enum N1’: + ‘N1’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension + • In the newtype declaration for ‘N1’ -tcfail117.hs:6:32: - Can't make a derived instance of ‘Enum N2’: - ‘N2’ must be an enumeration type - (an enumeration consists of one or more nullary, non-GADT constructors) - In the data declaration for ‘N2’ +tcfail117.hs:7:32: error: + • Can't make a derived instance of ‘Enum N2’: + ‘N2’ must be an enumeration type + (an enumeration consists of one or more nullary, non-GADT constructors) + • In the data declaration for ‘N2’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.hs b/testsuite/tests/typecheck/should_fail/tcfail122.hs index 2594ca6e24..77455c7c7b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail122.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail122.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, KindSignatures #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.stderr b/testsuite/tests/typecheck/should_fail/tcfail122.stderr index 39507bdbeb..9aed03214b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail122.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail122.stderr @@ -1,5 +1,5 @@ -tcfail122.hs:8:9: error: +tcfail122.hs:9:9: error: • Couldn't match kind ‘*’ with ‘* -> *’ When matching types c0 :: (* -> *) -> * @@ -16,4 +16,4 @@ tcfail122.hs:8:9: error: = [undefined :: forall a b. a b, undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d] • Relevant bindings include - foo :: [a b] (bound at tcfail122.hs:7:1) + foo :: [a b] (bound at tcfail122.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.hs b/testsuite/tests/typecheck/should_fail/tcfail132.hs index 910fc2267c..c241c18e4c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail132.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail132.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Fails with a kind error. -- The current error message was rather horrible (trac bug #312): -- diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.stderr b/testsuite/tests/typecheck/should_fail/tcfail132.stderr index 92f7c2ab52..a026a3a9f9 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail132.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail132.stderr @@ -1,5 +1,5 @@ -tcfail132.hs:17:37: error: +tcfail132.hs:18:37: error: • Couldn't match kind ‘*’ with ‘* -> *’ Expected kind ‘* -> * -> * -> *’, but ‘Object f' f t’ has kind ‘* -> * -> *’ @@ -7,7 +7,7 @@ tcfail132.hs:17:37: error: In the type ‘T (Object f' f t) (DUnit t)’ In the type declaration for ‘LiftObject’ -tcfail132.hs:17:53: error: +tcfail132.hs:18:53: error: • Couldn't match kind ‘*’ with ‘* -> *’ Expected kind ‘* -> * -> * -> *’, but ‘DUnit t’ has kind ‘* -> * -> *’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail139.hs b/testsuite/tests/typecheck/should_fail/tcfail139.hs index af21c8afba..5532523a7c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail139.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail139.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Should be rejected by Haskell 98 module Foo where diff --git a/testsuite/tests/typecheck/should_fail/tcfail139.stderr b/testsuite/tests/typecheck/should_fail/tcfail139.stderr index e97ff3bf8a..496df9488f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail139.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail139.stderr @@ -1,7 +1,7 @@ -tcfail139.hs:6:10: - Illegal instance declaration for ‘Bounded Foo’ - (All instance types must be of the form (T t1 ... tn) - where T is not a synonym. - Use TypeSynonymInstances if you want to disable this.) - In the instance declaration for ‘Bounded Foo’ +tcfail139.hs:7:10: error: + • Illegal instance declaration for ‘Bounded Foo’ + (All instance types must be of the form (T t1 ... tn) + where T is not a synonym. + Use TypeSynonymInstances if you want to disable this.) + • In the instance declaration for ‘Bounded Foo’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.hs b/testsuite/tests/typecheck/should_fail/tcfail140.hs index 8a4bb7dbe5..d897f138de 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail140.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail140.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- GHC 6.4 gave pretty horrible error messages -- for some of these examples -- c.f. SourceForge [ ghc-Bugs-1231273 ] confusing error diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr index 8bce6238c6..d40b317130 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr @@ -1,38 +1,38 @@ -tcfail140.hs:10:7: error: +tcfail140.hs:11:7: error: • Couldn't match expected type ‘t0 -> t’ with actual type ‘Int’ • The function ‘f’ is applied to two value arguments, but its type ‘Int -> Int’ has only one In the expression: f 3 9 In an equation for ‘bar’: bar = f 3 9 - • Relevant bindings include bar :: t (bound at tcfail140.hs:10:1) + • Relevant bindings include bar :: t (bound at tcfail140.hs:11:1) -tcfail140.hs:12:10: error: +tcfail140.hs:13:10: error: • Couldn't match expected type ‘t1 -> t’ with actual type ‘Int’ • The function ‘f’ is applied to two value arguments, but its type ‘Int -> Int’ has only one In the expression: 3 `f` 4 In an equation for ‘rot’: rot xs = 3 `f` 4 • Relevant bindings include - rot :: p -> t (bound at tcfail140.hs:12:1) + rot :: p -> t (bound at tcfail140.hs:13:1) -tcfail140.hs:14:15: error: +tcfail140.hs:15:15: error: • Couldn't match expected type ‘a -> b’ with actual type ‘Int’ • In the first argument of ‘map’, namely ‘(3 `f`)’ In the expression: map (3 `f`) xs In an equation for ‘bot’: bot xs = map (3 `f`) xs • Relevant bindings include - xs :: [a] (bound at tcfail140.hs:14:5) - bot :: [a] -> [b] (bound at tcfail140.hs:14:1) + xs :: [a] (bound at tcfail140.hs:15:5) + bot :: [a] -> [b] (bound at tcfail140.hs:15:1) -tcfail140.hs:16:8: error: +tcfail140.hs:17:8: error: • The constructor ‘Just’ should have 1 argument, but has been given none • In the pattern: Just The lambda expression ‘\ Just x -> x’ has two value arguments, but its type ‘Maybe a -> a’ has only one In the expression: (\ Just x -> x) :: Maybe a -> a -tcfail140.hs:19:1: error: +tcfail140.hs:20:1: error: • Couldn't match expected type ‘Int’ with actual type ‘p0 -> Bool’ • The equation(s) for ‘g’ have two value arguments, but its type ‘Int -> Int’ has only one diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.hs b/testsuite/tests/typecheck/should_fail/tcfail142.hs index a628b0e335..246d568e01 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail142.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail142.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} -- Tests top-level ambiguity resolution diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr index ac36ffb5e0..ecb22021f3 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr @@ -1,10 +1,10 @@ -tcfail142.hs:18:8: error: +tcfail142.hs:19:8: error: • Could not deduce (Bar a0 r) from the context: Bar a r bound by the type signature for: bar :: forall a r. Bar a r => r -> () - at tcfail142.hs:18:8-25 + at tcfail142.hs:19:8-25 The type variable ‘a0’ is ambiguous • In the ambiguity check for ‘bar’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.hs b/testsuite/tests/typecheck/should_fail/tcfail143.hs index 55b45eca31..9051c629da 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail143.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail143.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE UndecidableInstances, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-} diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr index 576ac1903d..841504d3f9 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: error: +tcfail143.hs:30:9: error: • 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 + instance ‘MinMax a Z Z a’ at tcfail143.hs:12:10-23 • In the expression: n1 `extend` n0 In an equation for ‘t2’: t2 = n1 `extend` n0 diff --git a/testsuite/tests/typecheck/should_fail/tcfail150.hs b/testsuite/tests/typecheck/should_fail/tcfail150.hs index cc2ca034ef..dc10e56727 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail150.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail150.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where -- !!! constraining the type variable in a class head is illegal diff --git a/testsuite/tests/typecheck/should_fail/tcfail150.stderr b/testsuite/tests/typecheck/should_fail/tcfail150.stderr index fe14a3ab1c..50a2793add 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail150.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail150.stderr @@ -1,5 +1,5 @@ -tcfail150.hs:6:3: error: +tcfail150.hs:7:3: error: • Constraint ‘Eq a’ in the type of ‘op’ constrains only the class type variables Enable ConstrainedClassMethods to allow it diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.hs b/testsuite/tests/typecheck/should_fail/tcfail154.hs index 6e3161bd46..f7e8bd1b82 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail154.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail154.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.stderr b/testsuite/tests/typecheck/should_fail/tcfail154.stderr index 3e613201f7..a4bda5998e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail154.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail154.stderr @@ -1,5 +1,5 @@ -tcfail154.hs:12:10: error: +tcfail154.hs:13:10: error: • Variable ‘a’ occurs more often in the constraint ‘C a a’ than in the instance head ‘Eq (T a)’ (Use UndecidableInstances to permit this) diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.hs b/testsuite/tests/typecheck/should_fail/tcfail158.hs index 95af345b36..f87ecbc53a 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail158.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail158.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ExplicitForAll #-} -- This one actually crashed in 6.4.1 diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.stderr b/testsuite/tests/typecheck/should_fail/tcfail158.stderr index c473465740..526db0a6ea 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail158.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail158.stderr @@ -1,5 +1,5 @@ -tcfail158.hs:14:19: error: +tcfail158.hs:15:19: error: • Expecting one more argument to ‘Val v’ Expected a type, but ‘Val v’ has kind ‘* -> *’ • In the type signature: bar :: forall v. Val v diff --git a/testsuite/tests/typecheck/should_fail/tcfail166.hs b/testsuite/tests/typecheck/should_fail/tcfail166.hs index 5a2d4b8df7..31fa9fad20 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail166.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail166.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- Without -XScopedTypeVariables, this should fail module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail166.stderr b/testsuite/tests/typecheck/should_fail/tcfail166.stderr index 5cc11d4a4b..ab8805183d 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail166.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail166.stderr @@ -1,5 +1,5 @@ -tcfail166.hs:5:13: error: +tcfail166.hs:6:13: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/tcfail173.hs b/testsuite/tests/typecheck/should_fail/tcfail173.hs index bad14bd539..0221aa74af 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail173.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail173.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail173.stderr b/testsuite/tests/typecheck/should_fail/tcfail173.stderr index 70a22c3af9..a3da917f27 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail173.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail173.stderr @@ -1,4 +1,4 @@ -tcfail173.hs:5:12: +tcfail173.hs:6:12: error: Illegal declaration of a type or class operator ‘<.>’ Use TypeOperators to declare operators in type and declarations diff --git a/testsuite/tests/typecheck/should_fail/tcfail183.hs b/testsuite/tests/typecheck/should_fail/tcfail183.hs index d46d87ad7c..0e21d72345 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail183.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail183.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module ShouldCompile where diff --git a/testsuite/tests/typecheck/should_fail/tcfail183.stderr b/testsuite/tests/typecheck/should_fail/tcfail183.stderr index 7a0e2ab346..96245ce100 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail183.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail183.stderr @@ -1,5 +1,5 @@ -tcfail183.hs:4:30: error: +tcfail183.hs:5:30: error: Illegal symbol ‘forall’ in type Perhaps you intended to use RankNTypes or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type> diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.hs b/testsuite/tests/typecheck/should_fail/tcfail184.hs index 210a9c7c9b..17ae2f5756 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail184.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail184.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -XScopedTypeVariables #-} -- We don't actually want scoped type variables, but this flag makes the diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.stderr b/testsuite/tests/typecheck/should_fail/tcfail184.stderr index fd6f1fdefd..8a1117caea 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail184.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail184.stderr @@ -1,5 +1,5 @@ -tcfail184.hs:8:19: error: +tcfail184.hs:9:19: error: • Illegal polymorphic type: forall a. Ord a => [a] -> [a] Perhaps you intended to use RankNTypes • In the definition of data constructor ‘MkSwizzle’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.hs b/testsuite/tests/typecheck/should_fail/tcfail195.hs index 4c2408e8ba..0b06236a52 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail195.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail195.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes, GADTs #-} module ShouldFail where diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.stderr b/testsuite/tests/typecheck/should_fail/tcfail195.stderr index 1fa821fbac..93a4b8f92f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail195.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail195.stderr @@ -1,5 +1,5 @@ -tcfail195.hs:6:3: error: +tcfail195.hs:7:3: error: • Illegal polymorphic type: forall a. a • In the definition of data constructor ‘Foo’ In the data type declaration for ‘Foo’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.hs b/testsuite/tests/typecheck/should_fail/tcfail209.hs index f4f0922231..e91b16dc1b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail209.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module FancyContextsWithoutExtension1 where type Showish = Show diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.stderr b/testsuite/tests/typecheck/should_fail/tcfail209.stderr index 1d2f315494..f52d2a8f79 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail209.stderr @@ -1,5 +1,5 @@ -tcfail209.hs:3:1: error: +tcfail209.hs:4:1: error: • Illegal constraint synonym of kind: ‘* -> Constraint’ (Use ConstraintKinds to permit this) • In the type synonym declaration for ‘Showish’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail209a.hs b/testsuite/tests/typecheck/should_fail/tcfail209a.hs index 90abb73520..ba0b192991 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209a.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail209a.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} module TcFail209a where g :: ((Show a, Num a), Eq a) => a -> a diff --git a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr index 1ccd64ff2b..aad518014e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209a.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail209a.stderr @@ -1,6 +1,5 @@ -tcfail209a.hs:3:6: error: +tcfail209a.hs:4:6: error: • Illegal tuple constraint: (Show a, Num a) (Use ConstraintKinds to permit this) - • In the type signature: - g :: ((Show a, Num a), Eq a) => a -> a + • In the type signature: g :: ((Show a, Num a), Eq a) => a -> a diff --git a/testsuite/tests/typecheck/should_run/TypeOf.hs b/testsuite/tests/typecheck/should_run/TypeOf.hs index 37113bfe80..0c3ac14b0f 100644 --- a/testsuite/tests/typecheck/should_run/TypeOf.hs +++ b/testsuite/tests/typecheck/should_run/TypeOf.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds, UnicodeSyntax #-} {-# OPTIONS -Wno-star-is-type #-} |