summaryrefslogtreecommitdiff
path: root/testsuite/tests/module
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2021-03-10 15:28:48 -0500
committerBen Gamari <ben@smart-cactus.org>2021-03-10 16:58:50 -0500
commit115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2 (patch)
tree19214707fa15f127d05ae515c74cff7e85776a7c /testsuite/tests/module
parent30ccf9ed1f592531dac9f3d750278fac6303c3e4 (diff)
downloadhaskell-115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2.tar.gz
Use GHC2021 as default language
Diffstat (limited to 'testsuite/tests/module')
-rw-r--r--testsuite/tests/module/mod103.hs2
-rw-r--r--testsuite/tests/module/mod182.hs1
-rw-r--r--testsuite/tests/module/mod182.stderr5
-rw-r--r--testsuite/tests/module/mod39.hs1
-rw-r--r--testsuite/tests/module/mod39.stderr2
-rw-r--r--testsuite/tests/module/mod41.hs1
-rw-r--r--testsuite/tests/module/mod41.stderr14
-rw-r--r--testsuite/tests/module/mod42.hs1
-rw-r--r--testsuite/tests/module/mod42.stderr14
-rw-r--r--testsuite/tests/module/mod43.hs1
-rw-r--r--testsuite/tests/module/mod43.stderr12
-rw-r--r--testsuite/tests/module/mod45.hs1
-rw-r--r--testsuite/tests/module/mod45.stderr10
13 files changed, 37 insertions, 28 deletions
diff --git a/testsuite/tests/module/mod103.hs b/testsuite/tests/module/mod103.hs
index ccd6ddfd0d..7d713e8f79 100644
--- a/testsuite/tests/module/mod103.hs
+++ b/testsuite/tests/module/mod103.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE Haskell2010 #-}
+{-# LANGUAGE NondecreasingIndentation #-}
-- !!! Layout rule extension (restricting empty do's).
module Foo where
diff --git a/testsuite/tests/module/mod182.hs b/testsuite/tests/module/mod182.hs
index 379fb3849f..69290a9104 100644
--- a/testsuite/tests/module/mod182.hs
+++ b/testsuite/tests/module/mod182.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- If 'ImportQualifiedPost' is not enabled 'qualified' can not appear in
-- postpositive position.
diff --git a/testsuite/tests/module/mod182.stderr b/testsuite/tests/module/mod182.stderr
index 2909298220..51886000de 100644
--- a/testsuite/tests/module/mod182.stderr
+++ b/testsuite/tests/module/mod182.stderr
@@ -1,3 +1,4 @@
-mod182.hs:5:16: error:
- Found ‘qualified’ in postpositive position.
+
+mod182.hs:6:16: error:
+ Found ‘qualified’ in postpositive position.
To allow this, enable language extension 'ImportQualifiedPost'
diff --git a/testsuite/tests/module/mod39.hs b/testsuite/tests/module/mod39.hs
index 477e0a3854..660cd11469 100644
--- a/testsuite/tests/module/mod39.hs
+++ b/testsuite/tests/module/mod39.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- !!! Class variable constraints on member funs
module M where
class C a where f :: Eq a => a
diff --git a/testsuite/tests/module/mod39.stderr b/testsuite/tests/module/mod39.stderr
index 95aaddbac5..d54a231152 100644
--- a/testsuite/tests/module/mod39.stderr
+++ b/testsuite/tests/module/mod39.stderr
@@ -1,5 +1,5 @@
-mod39.hs:3:17: error:
+mod39.hs:4:17: error:
• Constraint ‘Eq a’ in the type of ‘f’
constrains only the class type variables
Enable ConstrainedClassMethods to allow it
diff --git a/testsuite/tests/module/mod41.hs b/testsuite/tests/module/mod41.hs
index a1ac924242..a290753a77 100644
--- a/testsuite/tests/module/mod41.hs
+++ b/testsuite/tests/module/mod41.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- !!! Repeated variable in instance predicate
module M where
instance Eq a => Eq (Either a a)
diff --git a/testsuite/tests/module/mod41.stderr b/testsuite/tests/module/mod41.stderr
index 9962da3716..d1253821cd 100644
--- a/testsuite/tests/module/mod41.stderr
+++ b/testsuite/tests/module/mod41.stderr
@@ -1,8 +1,8 @@
-mod41.hs:3:18:
- Illegal instance declaration for ‘Eq (Either 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 (Either a a)’
+mod41.hs:4:18: error:
+ • Illegal instance declaration for ‘Eq (Either 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 (Either a a)’
diff --git a/testsuite/tests/module/mod42.hs b/testsuite/tests/module/mod42.hs
index 9828d8b642..bcab1f9766 100644
--- a/testsuite/tests/module/mod42.hs
+++ b/testsuite/tests/module/mod42.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- !!! Not "simple type" in instance
module M where
instance Eq a
diff --git a/testsuite/tests/module/mod42.stderr b/testsuite/tests/module/mod42.stderr
index 03e7f8cdce..45d649177a 100644
--- a/testsuite/tests/module/mod42.stderr
+++ b/testsuite/tests/module/mod42.stderr
@@ -1,8 +1,8 @@
-mod42.hs:3:10:
- Illegal instance declaration for ‘Eq 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’
+mod42.hs:4:10: error:
+ • Illegal instance declaration for ‘Eq 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’
diff --git a/testsuite/tests/module/mod43.hs b/testsuite/tests/module/mod43.hs
index 085382f8b0..0017df031c 100644
--- a/testsuite/tests/module/mod43.hs
+++ b/testsuite/tests/module/mod43.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- !!! Type synonym in instance
module M where
instance Eq String
diff --git a/testsuite/tests/module/mod43.stderr b/testsuite/tests/module/mod43.stderr
index d73c51e4a4..f63e09207b 100644
--- a/testsuite/tests/module/mod43.stderr
+++ b/testsuite/tests/module/mod43.stderr
@@ -1,7 +1,7 @@
-mod43.hs:3:10:
- Illegal instance declaration for ‘Eq String’
- (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 ‘Eq String’
+mod43.hs:4:10: error:
+ • Illegal instance declaration for ‘Eq String’
+ (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 ‘Eq String’
diff --git a/testsuite/tests/module/mod45.hs b/testsuite/tests/module/mod45.hs
index 03a1bc32ba..a49f7da619 100644
--- a/testsuite/tests/module/mod45.hs
+++ b/testsuite/tests/module/mod45.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
-- !!! Type sigs in instance decl
module M where
data T = T Int
diff --git a/testsuite/tests/module/mod45.stderr b/testsuite/tests/module/mod45.stderr
index ac8f21b54c..8f62bad0e3 100644
--- a/testsuite/tests/module/mod45.stderr
+++ b/testsuite/tests/module/mod45.stderr
@@ -1,6 +1,6 @@
-mod45.hs:5:11:
- Illegal type signature in instance declaration:
- (==) :: T -> T -> Bool
- (Use InstanceSigs to allow this)
- In the instance declaration for ‘Eq T’
+mod45.hs:6:11: error:
+ • Illegal type signature in instance declaration:
+ (==) :: T -> T -> Bool
+ (Use InstanceSigs to allow this)
+ • In the instance declaration for ‘Eq T’