summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/flags
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/safeHaskell/flags
parent30ccf9ed1f592531dac9f3d750278fac6303c3e4 (diff)
downloadhaskell-115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2.tar.gz
Use GHC2021 as default language
Diffstat (limited to 'testsuite/tests/safeHaskell/flags')
-rw-r--r--testsuite/tests/safeHaskell/flags/Flags02.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags01.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags11.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags17.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags17.stderr4
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags20.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags21.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags22.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags22.stderr4
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags23.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags23.stderr4
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags25.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags25.stderr2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags26.hs1
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags26.stderr2
-rw-r--r--testsuite/tests/safeHaskell/flags/all.T4
16 files changed, 20 insertions, 10 deletions
diff --git a/testsuite/tests/safeHaskell/flags/Flags02.hs b/testsuite/tests/safeHaskell/flags/Flags02.hs
index 072d4509a1..080791133b 100644
--- a/testsuite/tests/safeHaskell/flags/Flags02.hs
+++ b/testsuite/tests/safeHaskell/flags/Flags02.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -pgmdll pgmdll, -I., -L., -Uggg, -Dggg, -with-rtsopts full #-}
-- | These are all flags that should be allowed
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags01.hs b/testsuite/tests/safeHaskell/flags/SafeFlags01.hs
index f5790eba64..37f3e18917 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags01.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags01.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE Safe #-}
-- | Basic test to see if Safe flags compiles
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags11.hs b/testsuite/tests/safeHaskell/flags/SafeFlags11.hs
index e90b105dde..aded57d931 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags11.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags11.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE Safe #-}
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags17.hs b/testsuite/tests/safeHaskell/flags/SafeFlags17.hs
index 9bbd7a0550..f991c17443 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags17.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags17.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -fpackage-trust #-}
-- | Basic test to see if Safe flags compiles
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr
index 4f8eae80b9..4ce52ce072 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags17.stderr
@@ -1,4 +1,4 @@
-SafeFlags17.hs:4:8: error:
+SafeFlags17.hs:5:8: error:
Prelude: Can't be safely imported!
- The package (base-4.13.0.0) the module resides in isn't trusted.
+ The package (base-4.16.0.0) the module resides in isn't trusted.
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags20.hs b/testsuite/tests/safeHaskell/flags/SafeFlags20.hs
index 8d415c1a09..01a7074ea0 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags20.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags20.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -fpackage-trust #-}
-- | Basic test to see if Safe flags compiles
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
index 5169a03583..7efc24b6ed 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -fwarn-unsafe #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred unsafe
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
index 3d5d8dc1af..4411f3d1a2 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -fwarn-unsafe #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred unsafe
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr
index 42d10b32c8..9d93e5e332 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags22.stderr
@@ -1,7 +1,7 @@
-SafeFlags22.hs:1:16: warning: [-Wunsafe]
+SafeFlags22.hs:2:16: warning: [-Wunsafe]
‘SafeFlags22’ has been inferred as unsafe!
Reason:
- SafeFlags22.hs:7:1: error:
+ SafeFlags22.hs:8:1: error:
System.IO.Unsafe: Can't be safely imported!
The module itself isn't safe.
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
index b3180bc1e1..854ea0a856 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -fwarn-unsafe -Werror #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred unsafe
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr
index ea03484823..6fef7a3e4c 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags23.stderr
@@ -1,7 +1,7 @@
-SafeFlags23.hs:1:16: error: [-Wunsafe, -Werror=unsafe]
+SafeFlags23.hs:2:16: error: [-Wunsafe, -Werror=unsafe]
‘SafeFlags22’ has been inferred as unsafe!
Reason:
- SafeFlags23.hs:7:1: error:
+ SafeFlags23.hs:8:1: error:
System.IO.Unsafe: Can't be safely imported!
The module itself isn't safe.
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
index 7d650d6a72..f8d7ff292a 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -fwarn-safe #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred safe
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr
index bf82025b4c..e26a813e83 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags25.stderr
@@ -1,3 +1,3 @@
-SafeFlags25.hs:1:16: warning: [-Wsafe]
+SafeFlags25.hs:2:16: warning: [-Wsafe]
‘SafeFlags25’ has been inferred as safe!
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
index 45b65f3d9e..faf116c01f 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE Haskell2010 #-}
{-# OPTIONS_GHC -fwarn-safe -Werror #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred safe
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr
index 45047aa019..dabbd92c00 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags26.stderr
@@ -1,3 +1,3 @@
-SafeFlags26.hs:1:16: error: [-Wsafe, -Werror=safe]
+SafeFlags26.hs:2:16: error: [-Wsafe, -Werror=safe]
‘SafeFlags26’ has been inferred as safe!
diff --git a/testsuite/tests/safeHaskell/flags/all.T b/testsuite/tests/safeHaskell/flags/all.T
index b92067d372..ed7ca4f88d 100644
--- a/testsuite/tests/safeHaskell/flags/all.T
+++ b/testsuite/tests/safeHaskell/flags/all.T
@@ -59,8 +59,8 @@ test('SafeFlags28', normal, compile_fail, [''])
test('SafeFlags29', normal, compile_fail, [''])
# test certain flags are still allowed under -XSafe
-test('Flags01', normal, compile, ['-XSafe'])
-test('Flags02', normal, compile, ['-XSafe'])
+test('Flags01', normal, compile, ['-XHaskell2010 -XSafe'])
+test('Flags02', normal, compile, ['-XHaskell2010 -XSafe'])
test('SafeFlags30', normal, compile_fail, [''])