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/safeHaskell | |
parent | 30ccf9ed1f592531dac9f3d750278fac6303c3e4 (diff) | |
download | haskell-115cd3c85a8c38f1fe2a10d4ee515f92c96dd5a2.tar.gz |
Use GHC2021 as default language
Diffstat (limited to 'testsuite/tests/safeHaskell')
230 files changed, 360 insertions, 193 deletions
diff --git a/testsuite/tests/safeHaskell/check/Check01.hs b/testsuite/tests/safeHaskell/check/Check01.hs index 1d5df588a4..4d54accbf2 100644 --- a/testsuite/tests/safeHaskell/check/Check01.hs +++ b/testsuite/tests/safeHaskell/check/Check01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fpackage-trust #-} {-# LANGUAGE Unsafe #-} module Check01 ( main' ) where diff --git a/testsuite/tests/safeHaskell/check/Check01.stderr b/testsuite/tests/safeHaskell/check/Check01.stderr index 5c8b8a3da5..b63d8d4a10 100644 --- a/testsuite/tests/safeHaskell/check/Check01.stderr +++ b/testsuite/tests/safeHaskell/check/Check01.stderr @@ -1,4 +1,4 @@ [3 of 3] Compiling Check01 ( Check01.hs, Check01.o ) <no location info>: error: - The package (base-4.13.0.0) is required to be trusted but it isn't! + The package (base-4.16.0.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/Check01_A.hs b/testsuite/tests/safeHaskell/check/Check01_A.hs index 8b318a5124..44623da44d 100644 --- a/testsuite/tests/safeHaskell/check/Check01_A.hs +++ b/testsuite/tests/safeHaskell/check/Check01_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check01_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check01_B.hs b/testsuite/tests/safeHaskell/check/Check01_B.hs index b584e51b97..7f2529e481 100644 --- a/testsuite/tests/safeHaskell/check/Check01_B.hs +++ b/testsuite/tests/safeHaskell/check/Check01_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check02.hs b/testsuite/tests/safeHaskell/check/Check02.hs index 50e64b79e8..83d971dc9f 100644 --- a/testsuite/tests/safeHaskell/check/Check02.hs +++ b/testsuite/tests/safeHaskell/check/Check02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Check02 ( main' ) where diff --git a/testsuite/tests/safeHaskell/check/Check02_A.hs b/testsuite/tests/safeHaskell/check/Check02_A.hs index d43dab727a..709161892e 100644 --- a/testsuite/tests/safeHaskell/check/Check02_A.hs +++ b/testsuite/tests/safeHaskell/check/Check02_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check02_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check02_B.hs b/testsuite/tests/safeHaskell/check/Check02_B.hs index 10d45ccfbb..70813b22ce 100644 --- a/testsuite/tests/safeHaskell/check/Check02_B.hs +++ b/testsuite/tests/safeHaskell/check/Check02_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check03.hs b/testsuite/tests/safeHaskell/check/Check03.hs index 71d158d7f6..5e9d2b4cb4 100644 --- a/testsuite/tests/safeHaskell/check/Check03.hs +++ b/testsuite/tests/safeHaskell/check/Check03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Check03 where diff --git a/testsuite/tests/safeHaskell/check/Check03_A.hs b/testsuite/tests/safeHaskell/check/Check03_A.hs index e7b8d75d03..7dfec4fdab 100644 --- a/testsuite/tests/safeHaskell/check/Check03_A.hs +++ b/testsuite/tests/safeHaskell/check/Check03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check03_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check03_B.hs b/testsuite/tests/safeHaskell/check/Check03_B.hs index bce45af4e5..dc274e0638 100644 --- a/testsuite/tests/safeHaskell/check/Check03_B.hs +++ b/testsuite/tests/safeHaskell/check/Check03_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check04.hs b/testsuite/tests/safeHaskell/check/Check04.hs index 2f6e94b3d5..de277d651f 100644 --- a/testsuite/tests/safeHaskell/check/Check04.hs +++ b/testsuite/tests/safeHaskell/check/Check04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} module Main ( main ) where diff --git a/testsuite/tests/safeHaskell/check/Check04_A.hs b/testsuite/tests/safeHaskell/check/Check04_A.hs index 3f6b5f00e9..fc7b6165dd 100644 --- a/testsuite/tests/safeHaskell/check/Check04_A.hs +++ b/testsuite/tests/safeHaskell/check/Check04_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Check04_A ( trace diff --git a/testsuite/tests/safeHaskell/check/Check04_B.hs b/testsuite/tests/safeHaskell/check/Check04_B.hs index 5280c51fad..20f9b4731b 100644 --- a/testsuite/tests/safeHaskell/check/Check04_B.hs +++ b/testsuite/tests/safeHaskell/check/Check04_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/Check06.hs b/testsuite/tests/safeHaskell/check/Check06.hs index 99649fa079..30c5955300 100644 --- a/testsuite/tests/safeHaskell/check/Check06.hs +++ b/testsuite/tests/safeHaskell/check/Check06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy, NoImplicitPrelude #-} {-# OPTIONS_GHC -fpackage-trust #-} diff --git a/testsuite/tests/safeHaskell/check/Check06_A.hs b/testsuite/tests/safeHaskell/check/Check06_A.hs index 4cda329fec..f2c00ff3ab 100644 --- a/testsuite/tests/safeHaskell/check/Check06_A.hs +++ b/testsuite/tests/safeHaskell/check/Check06_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- safe inferred, with requirement base is trusted module Check06_A where diff --git a/testsuite/tests/safeHaskell/check/Check08.hs b/testsuite/tests/safeHaskell/check/Check08.hs index dde6908f30..da1aa6a50b 100644 --- a/testsuite/tests/safeHaskell/check/Check08.hs +++ b/testsuite/tests/safeHaskell/check/Check08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy, NoImplicitPrelude #-} {-# OPTIONS_GHC -fpackage-trust #-} diff --git a/testsuite/tests/safeHaskell/check/Check08.stderr b/testsuite/tests/safeHaskell/check/Check08.stderr index d83ad784fd..9eb6691bc8 100644 --- a/testsuite/tests/safeHaskell/check/Check08.stderr +++ b/testsuite/tests/safeHaskell/check/Check08.stderr @@ -3,4 +3,4 @@ [3 of 3] Compiling Check08 ( Check08.hs, Check08.o ) <no location info>: error: - The package (base-4.13.0.0) is required to be trusted but it isn't! + The package (base-4.16.0.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/Check08_A.hs b/testsuite/tests/safeHaskell/check/Check08_A.hs index 4438a34e09..601bf518e4 100644 --- a/testsuite/tests/safeHaskell/check/Check08_A.hs +++ b/testsuite/tests/safeHaskell/check/Check08_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE NoImplicitPrelude #-} -- safe inferred, with no pkg trust reqs diff --git a/testsuite/tests/safeHaskell/check/Check08_B.hs b/testsuite/tests/safeHaskell/check/Check08_B.hs index 42d01f2b33..484f8dccec 100644 --- a/testsuite/tests/safeHaskell/check/Check08_B.hs +++ b/testsuite/tests/safeHaskell/check/Check08_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- safe inferred, with requirement base is trusted module Check08_B where diff --git a/testsuite/tests/safeHaskell/check/Check09.hs b/testsuite/tests/safeHaskell/check/Check09.hs index cb04dada0f..2770323517 100644 --- a/testsuite/tests/safeHaskell/check/Check09.hs +++ b/testsuite/tests/safeHaskell/check/Check09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Check09 where diff --git a/testsuite/tests/safeHaskell/check/Check09.stderr b/testsuite/tests/safeHaskell/check/Check09.stderr index 6d1e031075..14af3c8f8b 100644 --- a/testsuite/tests/safeHaskell/check/Check09.stderr +++ b/testsuite/tests/safeHaskell/check/Check09.stderr @@ -1,8 +1,8 @@ -Check09.hs:4:1: error: +Check09.hs:5:1: 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. -Check09.hs:5:1: error: +Check09.hs:6:1: error: Data.ByteString.Char8: Can't be safely imported! - The package (bytestring-0.10.9.0) the module resides in isn't trusted. + The package (bytestring-0.10.12.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/Check10.hs b/testsuite/tests/safeHaskell/check/Check10.hs index e72e5f3886..67c04b7236 100644 --- a/testsuite/tests/safeHaskell/check/Check10.hs +++ b/testsuite/tests/safeHaskell/check/Check10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Check10 where diff --git a/testsuite/tests/safeHaskell/check/CheckB.hs b/testsuite/tests/safeHaskell/check/CheckB.hs index 7e649a1598..98faadc79e 100644 --- a/testsuite/tests/safeHaskell/check/CheckB.hs +++ b/testsuite/tests/safeHaskell/check/CheckB.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- Since Safe we require base package be trusted to compile diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs index 107881b2d8..630c8bcef2 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe01 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr index 5e4918e66f..0381edfccb 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr @@ -1,4 +1,4 @@ -ImpSafe01.hs:9:1: error: +ImpSafe01.hs:10:1: error: Data.Word: 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/check/pkg01/ImpSafe02.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs index c6ba0968d0..c27c62fa1c 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe02 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs index 485e9e238c..989fa1ed2e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs index 06f5d39754..63f121f7ea 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module ImpSafe03_A where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs index 3a8882905f..831d1b2bc1 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module ImpSafe04 ( MyWord ) where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr index cf9f32de45..a0445afd23 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr @@ -1,4 +1,4 @@ -ImpSafe04.hs:9:1: error: +ImpSafe04.hs:10:1: error: Data.Word: 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/check/pkg01/ImpSafeOnly01.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs index 2143d3139b..4a7364db8e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs index 27281b9cce..460ee1771e 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs index d09e39937d..ea200510fe 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr index 1afb523f9a..aef125b2ef 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly03.stderr @@ -1,4 +1,4 @@ -ImpSafeOnly03.hs:4:1: +ImpSafeOnly03.hs:5:1: error: M_SafePkg3: Can't be safely imported! The package (safePkg01-1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs index d09e39937d..ea200510fe 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs index be577d1ccc..e7c8403d97 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr index 28826c8b16..7e854073bf 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly05.stderr @@ -1,4 +1,4 @@ -ImpSafeOnly05.hs:4:1: +ImpSafeOnly05.hs:5:1: error: M_SafePkg5: Can't be safely imported! The package (safePkg01-1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs index be577d1ccc..e7c8403d97 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs index 975cff482a..5b4b5a4199 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs index b81abf9ccb..d7bbdebb56 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs index 9311f26a89..dd89994e80 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where 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, ['']) diff --git a/testsuite/tests/safeHaskell/ghci/all.T b/testsuite/tests/safeHaskell/ghci/all.T index 26f72d20b8..fac80f36c0 100644 --- a/testsuite/tests/safeHaskell/ghci/all.T +++ b/testsuite/tests/safeHaskell/ghci/all.T @@ -18,6 +18,6 @@ test('p16', normal, ghci_script, ['p16.script']) test('p17', normalise_version("bytestring"), ghci_script, ['p17.script']) # 7172 test('p18', normalise_version("bytestring"), ghci_script, ['p18.script']) -test('T12509', [extra_hc_opts('-XSafe')], ghci_script, ['T12509.script']) +test('T12509', [extra_hc_opts('-XNoGeneralizedNewtypeDeriving -XSafe')], ghci_script, ['T12509.script']) test('T19243', normal, ghci_script, ['T19243.script']) diff --git a/testsuite/tests/safeHaskell/ghci/p1.script b/testsuite/tests/safeHaskell/ghci/p1.script index 3c55ad7208..caa5eb8383 100644 --- a/testsuite/tests/safeHaskell/ghci/p1.script +++ b/testsuite/tests/safeHaskell/ghci/p1.script @@ -1,4 +1,5 @@ -- Test disabled language extensions +:set -XHaskell2010 :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p10.script b/testsuite/tests/safeHaskell/ghci/p10.script index e1cefae496..4baa1aa631 100644 --- a/testsuite/tests/safeHaskell/ghci/p10.script +++ b/testsuite/tests/safeHaskell/ghci/p10.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p10.stderr b/testsuite/tests/safeHaskell/ghci/p10.stderr index fdb45da711..d3c7fe2f5e 100644 --- a/testsuite/tests/safeHaskell/ghci/p10.stderr +++ b/testsuite/tests/safeHaskell/ghci/p10.stderr @@ -1,2 +1,2 @@ -<interactive>:9:1: error: Variable not in scope: b +<interactive>:10:1: error: Variable not in scope: b diff --git a/testsuite/tests/safeHaskell/ghci/p11.script b/testsuite/tests/safeHaskell/ghci/p11.script index 19fb759600..f4aaaf8336 100644 --- a/testsuite/tests/safeHaskell/ghci/p11.script +++ b/testsuite/tests/safeHaskell/ghci/p11.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p12.script b/testsuite/tests/safeHaskell/ghci/p12.script index 486302e8ed..df003ecbda 100644 --- a/testsuite/tests/safeHaskell/ghci/p12.script +++ b/testsuite/tests/safeHaskell/ghci/p12.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test you can't unset options :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p13.script b/testsuite/tests/safeHaskell/ghci/p13.script index 950f95ab67..0336061b0c 100644 --- a/testsuite/tests/safeHaskell/ghci/p13.script +++ b/testsuite/tests/safeHaskell/ghci/p13.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: Overlapping :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p13.stderr b/testsuite/tests/safeHaskell/ghci/p13.stderr index 7ba149a36b..ba73130146 100644 --- a/testsuite/tests/safeHaskell/ghci/p13.stderr +++ b/testsuite/tests/safeHaskell/ghci/p13.stderr @@ -1,13 +1,13 @@ -<interactive>:10:1: error: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [overlapping] [safe] Pos [Int] - -- Defined at <interactive>:8:30 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] Pos [a] -- Defined at P13_A.hs:6:10 - In the expression: res [1 :: Int, 2 :: Int] - In an equation for ‘it’: it = res [1 :: Int, 2 :: Int] +<interactive>:11:1: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [overlapping] [safe] Pos [Int] + -- Defined at <interactive>:9:30 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] Pos [a] -- Defined at P13_A.hs:6:10 + • In the expression: res [1 :: Int, 2 :: Int] + In an equation for ‘it’: it = res [1 :: Int, 2 :: Int] diff --git a/testsuite/tests/safeHaskell/ghci/p14.script b/testsuite/tests/safeHaskell/ghci/p14.script index 4802faf940..909b512c39 100644 --- a/testsuite/tests/safeHaskell/ghci/p14.script +++ b/testsuite/tests/safeHaskell/ghci/p14.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: RULES :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p14.stderr b/testsuite/tests/safeHaskell/ghci/p14.stderr index 736e8b448c..3e0ac0ae46 100644 --- a/testsuite/tests/safeHaskell/ghci/p14.stderr +++ b/testsuite/tests/safeHaskell/ghci/p14.stderr @@ -1,5 +1,5 @@ -<interactive>:9:25: error: +<interactive>:10:25: error: • No instance for (Num a) arising from a use of ‘f’ Possible fix: add (Num a) to the context of the RULE "id/Int" • In the expression: f diff --git a/testsuite/tests/safeHaskell/ghci/p16.script b/testsuite/tests/safeHaskell/ghci/p16.script index 2bcea65c95..a4b829c9d8 100644 --- a/testsuite/tests/safeHaskell/ghci/p16.script +++ b/testsuite/tests/safeHaskell/ghci/p16.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: GeneralizedNewtypeDeriving :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p16.stderr b/testsuite/tests/safeHaskell/ghci/p16.stderr index 52315cce17..36ee15327d 100644 --- a/testsuite/tests/safeHaskell/ghci/p16.stderr +++ b/testsuite/tests/safeHaskell/ghci/p16.stderr @@ -2,14 +2,14 @@ <no location info>: warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving -<interactive>:15:29: error: +<interactive>:16:29: error: • Can't make a derived instance of ‘Op T2’: ‘Op’ is not a stock derivable class (Eq, Show, etc.) Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension • In the newtype declaration for ‘T2’ -<interactive>:18:9: error: +<interactive>:19:9: error: • Data constructor not in scope: T2 :: T -> t - • Perhaps you meant ‘T1’ (line 12) + • Perhaps you meant ‘T1’ (line 13) -<interactive>:21:4: error: Variable not in scope: y +<interactive>:22:4: error: Variable not in scope: y diff --git a/testsuite/tests/safeHaskell/ghci/p17.script b/testsuite/tests/safeHaskell/ghci/p17.script index c9821d4e17..1402ff1d21 100644 --- a/testsuite/tests/safeHaskell/ghci/p17.script +++ b/testsuite/tests/safeHaskell/ghci/p17.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad imports :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p2.script b/testsuite/tests/safeHaskell/ghci/p2.script index 188915579e..7eab1d425f 100644 --- a/testsuite/tests/safeHaskell/ghci/p2.script +++ b/testsuite/tests/safeHaskell/ghci/p2.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad options :unset +s diff --git a/testsuite/tests/safeHaskell/ghci/p3.script b/testsuite/tests/safeHaskell/ghci/p3.script index c2d9061739..9d34af8c4d 100644 --- a/testsuite/tests/safeHaskell/ghci/p3.script +++ b/testsuite/tests/safeHaskell/ghci/p3.script @@ -1,3 +1,5 @@ +:set -XHaskell2010 + -- Test bad imports :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p4.script b/testsuite/tests/safeHaskell/ghci/p4.script index 8d78f40679..ae08ed619c 100644 --- a/testsuite/tests/safeHaskell/ghci/p4.script +++ b/testsuite/tests/safeHaskell/ghci/p4.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test bad direct calls :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p4.stderr b/testsuite/tests/safeHaskell/ghci/p4.stderr index 1d416eba39..621960f9e2 100644 --- a/testsuite/tests/safeHaskell/ghci/p4.stderr +++ b/testsuite/tests/safeHaskell/ghci/p4.stderr @@ -1,9 +1,8 @@ -<interactive>:5:9: error: +<interactive>:6:9: error: Not in scope: ‘System.IO.Unsafe.unsafePerformIO’ No module named ‘System.IO.Unsafe’ is imported. -<interactive>:6:9: error: - Variable not in scope: x :: IO b0 -> t +<interactive>:7:9: error: Variable not in scope: x :: IO b0 -> t -<interactive>:7:1: error: Variable not in scope: y +<interactive>:8:1: error: Variable not in scope: y diff --git a/testsuite/tests/safeHaskell/ghci/p5.script b/testsuite/tests/safeHaskell/ghci/p5.script index cdf6088812..b42973e0fe 100644 --- a/testsuite/tests/safeHaskell/ghci/p5.script +++ b/testsuite/tests/safeHaskell/ghci/p5.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test unsetting safe :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p6.script b/testsuite/tests/safeHaskell/ghci/p6.script index 8590fd6449..2e326acd74 100644 --- a/testsuite/tests/safeHaskell/ghci/p6.script +++ b/testsuite/tests/safeHaskell/ghci/p6.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test restricted functionality: FFI :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p6.stderr b/testsuite/tests/safeHaskell/ghci/p6.stderr index 6213243bb0..d8dc09a996 100644 --- a/testsuite/tests/safeHaskell/ghci/p6.stderr +++ b/testsuite/tests/safeHaskell/ghci/p6.stderr @@ -1,10 +1,10 @@ -<interactive>:11:1: error: +<interactive>:12:1: error: • Unacceptable result type in foreign declaration: Safe Haskell is on, all FFI imports must be in the IO monad • When checking declaration: foreign import ccall safe "sin" c_sin :: Double -> Double -<interactive>:12:1: error: +<interactive>:13:1: error: • Variable not in scope: c_sin :: t0 -> t - • Perhaps you meant ‘c_sin'’ (line 7) + • Perhaps you meant ‘c_sin'’ (line 8) diff --git a/testsuite/tests/safeHaskell/ghci/p7.script b/testsuite/tests/safeHaskell/ghci/p7.script index ea4190b0a4..9aba5c55e7 100644 --- a/testsuite/tests/safeHaskell/ghci/p7.script +++ b/testsuite/tests/safeHaskell/ghci/p7.script @@ -1,3 +1,5 @@ +:set -XHaskell2010 + -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p8.script b/testsuite/tests/safeHaskell/ghci/p8.script index 7d5101f226..49e905bd45 100644 --- a/testsuite/tests/safeHaskell/ghci/p8.script +++ b/testsuite/tests/safeHaskell/ghci/p8.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p9.script b/testsuite/tests/safeHaskell/ghci/p9.script index 298944dcae..b8d5f0bf13 100644 --- a/testsuite/tests/safeHaskell/ghci/p9.script +++ b/testsuite/tests/safeHaskell/ghci/p9.script @@ -1,3 +1,4 @@ +:set -XHaskell2010 -- Test load works :unset +s :set -XSafe diff --git a/testsuite/tests/safeHaskell/ghci/p9.stderr b/testsuite/tests/safeHaskell/ghci/p9.stderr index fdb45da711..d3c7fe2f5e 100644 --- a/testsuite/tests/safeHaskell/ghci/p9.stderr +++ b/testsuite/tests/safeHaskell/ghci/p9.stderr @@ -1,2 +1,2 @@ -<interactive>:9:1: error: Variable not in scope: b +<interactive>:10:1: error: Variable not in scope: b diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs index beaf3881f5..896ddbff39 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr index 20349c6024..54dab18cd3 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap1_A ( SH_Overlap1_A.hs, SH_Overlap1_A.o ) [3 of 3] Compiling SH_Overlap1 ( SH_Overlap1.hs, SH_Overlap1.o ) -SH_Overlap1.hs:15:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap1_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap1.hs:11:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap1.hs:16:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap1_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance C [a] -- Defined at SH_Overlap1.hs:12:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs index 7c5e5a1929..8f455d0501 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs index 76d0b2ea9e..551088edbd 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap10_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs index 1efb86c064..72a9dc5a1e 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap10_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap10_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs index f591c0a188..2c336ed037 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr index aca02ef4a9..9eb029951f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11.stderr @@ -2,18 +2,18 @@ [2 of 3] Compiling SH_Overlap11_A ( SH_Overlap11_A.hs, SH_Overlap11_A.o ) [3 of 3] Compiling SH_Overlap11 ( SH_Overlap11.hs, SH_Overlap11.o ) -SH_Overlap11.hs:1:16: warning: [-Wunsafe] +SH_Overlap11.hs:2:16: warning: [-Wunsafe] ‘SH_Overlap11’ has been inferred as unsafe! Reason: - SH_Overlap11.hs:17:8: warning: + SH_Overlap11.hs:18:8: warning: • Unsafe overlapping instances for C [Int] arising from a use of ‘f’ The matching instance is: instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap11_A.hs:11:3 + -- Defined at SH_Overlap11_A.hs:12:3 It is compiled in a Safe module and as such can only overlap instances from the same module, however it overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap11.hs:13:3 + instance C [a] -- Defined at SH_Overlap11.hs:14:3 • In the expression: f ([1, 2, 3, 4] :: [Int]) In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs index 100a9f30db..6f834cae24 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap11_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs index 63ba1d7c6f..4d1e226a96 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap11_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs index d231bc9365..6a8a2c2970 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap1_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs index 1dbb59b6b4..fb2e648854 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap1_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap1_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs index 5df87abcab..9ce118d9cb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr index b4f15515b0..2eed7608d1 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap2_A ( SH_Overlap2_A.hs, SH_Overlap2_A.o ) [3 of 3] Compiling SH_Overlap2 ( SH_Overlap2.hs, SH_Overlap2.o ) -SH_Overlap2.hs:18:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap2_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap2.hs:14:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap2.hs:19:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap2_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance C [a] -- Defined at SH_Overlap2.hs:15:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs index 2510818e06..2e2be0bd56 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap2_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs index fcd8ef8f56..0fbb784ff2 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap2_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap2_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs index 8ffa53f84b..019c315db3 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs index 0a3393ef4d..50eedd6e1a 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap3_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs index 4908d73427..12d6d5103d 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap3_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap3_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs index 0d9f445080..a9951fac94 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs index bb1625e222..a0caa60cfb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap4_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs index 2a53fff8c6..56f974fd06 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap4_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap4_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs index 185946d56f..79b5567580 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr index 8c2bc7df9d..9de7ecc708 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap5_A ( SH_Overlap5_A.hs, SH_Overlap5_A.o ) [3 of 3] Compiling SH_Overlap5 ( SH_Overlap5.hs, SH_Overlap5.o ) -SH_Overlap5.hs:15:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap5_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] C [a] -- Defined at SH_Overlap5.hs:11:3 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap5.hs:16:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap5_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] C [a] -- Defined at SH_Overlap5.hs:12:3 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs index 71c6bac0f0..7032b16747 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap5_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs index e7e8102b98..3dc6ff18fc 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap5_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SH_Overlap5_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs index e38037ab8b..fa07f61e91 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr index e5b7ac95d6..7804b9e5d5 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr @@ -2,14 +2,15 @@ [2 of 3] Compiling SH_Overlap6_A ( SH_Overlap6_A.hs, SH_Overlap6_A.o ) [3 of 3] Compiling SH_Overlap6 ( SH_Overlap6.hs, SH_Overlap6.o ) -SH_Overlap6.hs:14:8: error: - Unsafe overlapping instances for C [Int] arising from a use of ‘f’ - The matching instance is: - instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap6_A.hs:11:3 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance [safe] C [a] -- Defined at SH_Overlap6.hs:10:10 - In the expression: f ([1, 2, 3, 4] :: [Int]) - In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) +SH_Overlap6.hs:15:8: error: + • Unsafe overlapping instances for C [Int] + arising from a use of ‘f’ + The matching instance is: + instance [overlap ok] [safe] C [Int] + -- Defined at SH_Overlap6_A.hs:12:3 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance [safe] C [a] -- Defined at SH_Overlap6.hs:11:10 + • In the expression: f ([1, 2, 3, 4] :: [Int]) + In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs index 788c2f384b..b495e284f0 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap6_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs index 5ec45676e9..0a8a81156e 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap6_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap6_B ( C(..) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs index e99e73fd41..179008744f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr index 45701f2529..ce90de4c72 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr @@ -2,18 +2,18 @@ [2 of 3] Compiling SH_Overlap7_A ( SH_Overlap7_A.hs, SH_Overlap7_A.o ) [3 of 3] Compiling SH_Overlap7 ( SH_Overlap7.hs, SH_Overlap7.o ) -SH_Overlap7.hs:1:16: error: [-Wunsafe, -Werror=unsafe] +SH_Overlap7.hs:2:16: error: [-Wunsafe, -Werror=unsafe] ‘SH_Overlap7’ has been inferred as unsafe! Reason: - SH_Overlap7.hs:14:8: warning: + SH_Overlap7.hs:15:8: warning: • Unsafe overlapping instances for C [Int] arising from a use of ‘f’ The matching instance is: instance [overlap ok] [safe] C [Int] - -- Defined at SH_Overlap7_A.hs:12:3 + -- Defined at SH_Overlap7_A.hs:13:3 It is compiled in a Safe module and as such can only overlap instances from the same module, however it overlaps the following instances from different modules: - instance C [a] -- Defined at SH_Overlap7.hs:10:10 + instance C [a] -- Defined at SH_Overlap7.hs:11:10 • In the expression: f ([1, 2, 3, 4] :: [Int]) In an equation for ‘test’: test = f ([1, 2, 3, 4] :: [Int]) diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs index 972c5abf4e..3ad4c87641 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs index 382cad01c8..8e0121f9b7 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE Safe #-} module SH_Overlap7_B ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs index 6026769941..173c4ff03f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs index 8c19b1acbd..3d437aaead 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap8_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap8_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs index 5ae00fa101..cdce1d9fcb 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs index 580bbda17b..608c937ce9 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap9_A ( diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs index 4cbf88692c..9db3e5a99f 100644 --- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs +++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap9_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} module SH_Overlap9_B ( C(..) diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs b/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs index 062c2db64d..165feca79b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} -- | Should fail compilation because we import Data.Word as safe and unsafe module Mixed02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr b/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr index b170a4550d..9fa48d4338 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr @@ -1,3 +1,3 @@ -Mixed02.hs:5:1: +Mixed02.hs:6:1: error: Module DW is imported both as a safe and unsafe import! diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs b/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs index fba39654d9..9212656d6c 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} -- | Should fail compilation because we import Data.Word as safe and unsafe module Mixed03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr b/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr index 4f4dcccbcf..0a9523ca33 100644 --- a/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr @@ -1,3 +1,3 @@ -Mixed03.hs:5:1: +Mixed03.hs:6:1: error: Module DW is imported both as a safe and unsafe import! diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs index 0e48580c98..a1e953ced5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered01 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs index f66ac43d78..9f52c43f40 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered01_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} -- | Trivial Safe Module module SafeInfered01_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs index 6656c5acf7..c1e4c37c99 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs index 57438d2761..bf9b8c9e70 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered02_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Only uses deriving of Typeable so should be considered safe module SafeInfered02_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs index 9c7af12231..cea614c558 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs index 9844ec6525..d6947e2d27 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered03_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE ForeignFunctionInterface #-} -- | FFI but in IO monad so safe module SafeInfered03_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs index 8752383a6b..deb2e8494f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeInfered04 where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs index 6f4db5db79..da7e808acb 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered04_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} -- | Safe as while it enables rules it doesn't define any. UnsafeInfered05 is a -- test case for when rules are defined and it should be unsafe diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs index 1e933ac3b0..ad4f232cc2 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr index 5d194064b8..7815bb7c81 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr @@ -1,8 +1,8 @@ -SafeInfered05.hs:2:14: warning: +SafeInfered05.hs:3:14: warning: -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS [1 of 2] Compiling SafeInfered05_A ( SafeInfered05_A.hs, SafeInfered05_A.o ) -SafeInfered05_A.hs:2:16: warning: [-Wsafe] +SafeInfered05_A.hs:3:16: warning: [-Wsafe] ‘SafeInfered05_A’ has been inferred as safe! [2 of 2] Compiling SafeInfered05 ( SafeInfered05.hs, SafeInfered05.o ) diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs index c9e5c964cb..72eeaeb097 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fwarn-safe #-} module SafeInfered05_A where diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs index 507367929b..84ed104d43 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr index 5e824de641..7efaba3490 100644 --- a/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/SafeWarn01.stderr @@ -1,3 +1,3 @@ -SafeWarn01.hs:2:16: warning: [-Wsafe] +SafeWarn01.hs:3:16: warning: [-Wsafe] ‘SafeWarn01’ has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/T16689.hs b/testsuite/tests/safeHaskell/safeInfered/T16689.hs index a1820aa4a1..2621ec6cff 100644 --- a/testsuite/tests/safeHaskell/safeInfered/T16689.hs +++ b/testsuite/tests/safeHaskell/safeInfered/T16689.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} main = return () diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs index 9dfaccd950..5a374cb99d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr index 7d42cb016f..7723e98dc1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe02.stderr @@ -1,3 +1,3 @@ -TrustworthySafe02.hs:1:14: warning: [-Wtrustworthy-safe (in -Wall)] +TrustworthySafe02.hs:2:14: warning: [-Wtrustworthy-safe (in -Wall)] ‘TrustworthySafe02’ is marked as Trustworthy but has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs index ad63e090e1..fe3e27ef5f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} -- temp broken by 452d6aa95 diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr index 9938109dcb..ff4a4e3631 100644 --- a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr @@ -1,3 +1,3 @@ -TrustworthySafe03.hs:1:14: warning: [-Wtrustworthy-safe (in -Wall)] +TrustworthySafe03.hs:2:14: warning: [-Wtrustworthy-safe (in -Wall)] ‘TrustworthySafe03’ is marked as Trustworthy but has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs index b1db9ea578..0a356f190b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered01 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr index 4e705d6a16..2698172348 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered01_A ( UnsafeInfered01_A.hs, UnsafeInfered01_A.o ) [2 of 2] Compiling UnsafeInfered01 ( UnsafeInfered01.hs, UnsafeInfered01.o ) -UnsafeInfered01.hs:4:1: error: +UnsafeInfered01.hs:5:1: error: UnsafeInfered01_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs index 67105965d8..f41e7e32f3 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered02 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr index e5593d57e9..203e241c99 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered02_A ( UnsafeInfered02_A.hs, UnsafeInfered02_A.o, UnsafeInfered02_A.dyn_o ) [2 of 2] Compiling UnsafeInfered02 ( UnsafeInfered02.hs, UnsafeInfered02.o, UnsafeInfered02.dyn_o ) -UnsafeInfered02.hs:4:1: error: +UnsafeInfered02.hs:5:1: error: UnsafeInfered02_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs index 67220ac4d0..115070b573 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered03 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr index 8a48fec4b0..b722af9bc9 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered03_A ( UnsafeInfered03_A.hs, UnsafeInfered03_A.o ) [2 of 2] Compiling UnsafeInfered03 ( UnsafeInfered03.hs, UnsafeInfered03.o ) -UnsafeInfered03.hs:4:1: error: +UnsafeInfered03.hs:5:1: error: UnsafeInfered03_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs index 712d02a350..4bf2b2bddc 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered05 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr index e70f03df38..4a0eb8000d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered05_A ( UnsafeInfered05_A.hs, UnsafeInfered05_A.o ) [2 of 2] Compiling UnsafeInfered05 ( UnsafeInfered05.hs, UnsafeInfered05.o ) -UnsafeInfered05.hs:4:1: error: +UnsafeInfered05.hs:5:1: error: UnsafeInfered05_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs index a5bb127202..f12f5f90df 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered06 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr index 42c8c3d1e5..623f4aea3c 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered06_A ( UnsafeInfered06_A.hs, UnsafeInfered06_A.o ) [2 of 2] Compiling UnsafeInfered06 ( UnsafeInfered06.hs, UnsafeInfered06.o ) -UnsafeInfered06.hs:4:1: error: +UnsafeInfered06.hs:5:1: error: UnsafeInfered06_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs index 394d7e6999..b9e2eff6ca 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered08 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs index d88eda96b1..d8c5137c82 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE OverlappingInstances #-} {-# OPTIONS_GHC -w #-} -- Turn off deprecation for OverlappingInstances -- | Safe, as we now check at overlap occurrence, not definition. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs index 1c1e61d3c5..4dcd5c82ea 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module UnsafeInfered09 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr index bf9b623eaa..b5ddab3f35 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr @@ -2,6 +2,6 @@ [2 of 3] Compiling UnsafeInfered09_A ( UnsafeInfered09_A.hs, UnsafeInfered09_A.o ) [3 of 3] Compiling UnsafeInfered09 ( UnsafeInfered09.hs, UnsafeInfered09.o ) -UnsafeInfered09.hs:4:1: error: +UnsafeInfered09.hs:5:1: error: UnsafeInfered09_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs index 3ba1584b08..ddedb09407 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Basic test to see if no safe infer flag works module UnsafeInfered10 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr index f626cf952f..fb4488000b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr @@ -1,6 +1,6 @@ [1 of 2] Compiling UnsafeInfered10_A ( UnsafeInfered10_A.hs, UnsafeInfered10_A.o ) [2 of 2] Compiling UnsafeInfered10 ( UnsafeInfered10.hs, UnsafeInfered10.o ) -UnsafeInfered10.hs:5:1: error: +UnsafeInfered10.hs:6:1: error: UnsafeInfered10_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs index 34555594e9..c8fd8b3f7b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Basic test to see if no safe infer flag works module UnsafeInfered11 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr index 18a6a459c7..919eec4e6b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr @@ -1,13 +1,13 @@ [1 of 2] Compiling UnsafeInfered11_A ( UnsafeInfered11_A.hs, UnsafeInfered11_A.o ) -UnsafeInfered11_A.hs:1:16: warning: [-Wunsafe] +UnsafeInfered11_A.hs:2:16: warning: [-Wunsafe] ‘UnsafeInfered11_A’ has been inferred as unsafe! Reason: - UnsafeInfered11_A.hs:17:11: warning: + UnsafeInfered11_A.hs:18:11: warning: Rule "lookupx/T" ignored User defined rules are disabled under Safe Haskell [2 of 2] Compiling UnsafeInfered11 ( UnsafeInfered11.hs, UnsafeInfered11.o ) -UnsafeInfered11.hs:5:1: error: +UnsafeInfered11.hs:6:1: error: UnsafeInfered11_A: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs index d209dcf5fe..aefaacac30 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} -- | Basic test to see if no safe infer flag works diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs index a39b46e2a0..24ae448a88 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} module UnsafeInfered12 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr index f05bf7fa8c..e3529474bd 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr @@ -1,6 +1,6 @@ -UnsafeInfered12.hs:2:16: error: [-Wunsafe, -Werror=unsafe] +UnsafeInfered12.hs:3:16: error: [-Wunsafe, -Werror=unsafe] ‘UnsafeInfered12’ has been inferred as unsafe! Reason: - UnsafeInfered12.hs:1:14: + UnsafeInfered12.hs:2:14: -XTemplateHaskell is not allowed in Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs index defc3a5243..ae9281643e 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered13.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered13 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs index 5b9f64210f..644c63f4cf 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered14.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered14 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs index 427c97b0ac..72008319c5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered15.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered15 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs index b3e7f34586..ffc65d093b 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered16 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs index 7f17a136ff..ff2abe647d 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered17.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} module UnsafeInfered17 where diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs index a6dbfe1745..1aaaf8e47a 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr index 58db37d3f0..2e15aa3954 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr @@ -1,3 +1,3 @@ -UnsafeInfered18.hs:3:14: warning: +UnsafeInfered18.hs:4:14: warning: -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs index 587bc4edbf..4b0b33b410 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered19.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-unsafe -Werror #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs index afe188db4f..f3eeea02ad 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr index 6d2afb2193..5424c5f2a2 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn01.stderr @@ -1,7 +1,7 @@ -UnsafeWarn01.hs:2:16: warning: [-Wunsafe] +UnsafeWarn01.hs:3:16: warning: [-Wunsafe] ‘UnsafeWarn01’ has been inferred as unsafe! Reason: - UnsafeWarn01.hs:7:1: error: + UnsafeWarn01.hs:8:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs index 6f62ca5c94..0d1924bf8f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr index 2ee83ac140..881db587d5 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.stderr @@ -1,6 +1,6 @@ -UnsafeWarn02.hs:2:16: warning: [-Wunsafe] +UnsafeWarn02.hs:3:16: warning: [-Wunsafe] ‘UnsafeWarn02’ has been inferred as unsafe! Reason: - UnsafeWarn02.hs:4:14: + UnsafeWarn02.hs:5:14: -XTemplateHaskell is not allowed in Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs index ded02de888..433824f8bd 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr index 6ddea45af1..ba23b72ee1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn03.stderr @@ -1,7 +1,7 @@ -UnsafeWarn03.hs:3:16: warning: [-Wunsafe] +UnsafeWarn03.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn03’ has been inferred as unsafe! Reason: - UnsafeWarn03.hs:8:1: error: + UnsafeWarn03.hs:9:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs index d8e8b84fa5..1d02985734 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr index c91f421344..90e6d5b6f1 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn04.stderr @@ -1,7 +1,7 @@ -UnsafeWarn04.hs:3:16: warning: [-Wunsafe] +UnsafeWarn04.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn04’ has been inferred as unsafe! Reason: - UnsafeWarn04.hs:8:1: error: + UnsafeWarn04.hs:9:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs index 76258d362b..3c9b3109f7 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_GHC -fwarn-trustworthy-safe #-} {-# OPTIONS_GHC -fwarn-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr index dfd4193b7a..2977504457 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.stderr @@ -1,14 +1,14 @@ -UnsafeWarn05.hs:4:16: warning: [-Wunsafe] +UnsafeWarn05.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn05’ has been inferred as unsafe! Reason: - UnsafeWarn05.hs:10:1: error: + UnsafeWarn05.hs:11:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. -UnsafeWarn05.hs:4:16: warning: [-Wunsafe] +UnsafeWarn05.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn05’ has been inferred as unsafe! Reason: - UnsafeWarn05.hs:15:11: warning: + UnsafeWarn05.hs:16:11: warning: Rule "g" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs index 671a64822b..8680fe5d6f 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} {-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr index 323bb19a39..98b1360202 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn06.stderr @@ -1,7 +1,7 @@ -UnsafeWarn06.hs:3:16: warning: [-Wunsafe] +UnsafeWarn06.hs:4:16: warning: [-Wunsafe] ‘UnsafeWarn06’ has been inferred as unsafe! Reason: - UnsafeWarn06.hs:8:11: warning: + UnsafeWarn06.hs:9:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs index 43982939b8..7efc9157e7 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} {-# OPTIONS_GHC -fwarn-safe #-} diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr index 11116b6460..91a4ec3547 100644 --- a/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr +++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn07.stderr @@ -1,7 +1,7 @@ -UnsafeWarn07.hs:4:16: warning: [-Wunsafe] +UnsafeWarn07.hs:5:16: warning: [-Wunsafe] ‘UnsafeWarn07’ has been inferred as unsafe! Reason: - UnsafeWarn07.hs:9:11: warning: + UnsafeWarn07.hs:10:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs index 5920c03161..399c0ea04d 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe, TemplateHaskell #-} -- | Test SafeLanguage disables things diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr index 88b5e05ab3..1fb5ec66bb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang01.stderr @@ -1,3 +1,3 @@ -SafeLang01.hs:1:20: - Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell +SafeLang01.hs:2:20: warning: + -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs index 4f3bce7e0a..8c73aeaf41 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fenable-rewrite-rules #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr index 33a66e6267..20d4d174b2 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr @@ -1,4 +1,4 @@ -SafeLang03.hs:7:11: Warning: +SafeLang03.hs:8:11: warning: Rule "f" ignored User defined rules are disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs index 7249c8d0ec..5cdb87cb13 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE ForeignFunctionInterface #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr index ae5d658619..7e1655e00a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr @@ -1,7 +1,7 @@ -SafeLang08.hs:9:1: - Unacceptable result type in foreign declaration: - Safe Haskell is on, all FFI imports must be in the IO monad - When checking declaration: - foreign import ccall safe "SafeLang08_A" c_sin - :: CDouble -> CDouble +SafeLang08.hs:10:1: error: + • Unacceptable result type in foreign declaration: + Safe Haskell is on, all FFI imports must be in the IO monad + • When checking declaration: + foreign import ccall safe "SafeLang08_A" c_sin + :: CDouble -> CDouble diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs index 5c88d3916d..bafddd068e 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr index 557c4f4858..26f04624af 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr @@ -2,19 +2,19 @@ [2 of 3] Compiling SafeLang10_B ( SafeLang10_B.hs, SafeLang10_B.o ) [3 of 3] Compiling Main ( SafeLang10.hs, SafeLang10.o ) -SafeLang10.hs:8:13: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [overlapping] [safe] Pos [Int] - -- Defined at SafeLang10_B.hs:13:30 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance Pos [a] -- Defined at SafeLang10_A.hs:13:10 - In the expression: res [(1 :: Int)] - In an equation for ‘r’: r = res [(1 :: Int)] - In the expression: - do let r = res ... - putStrLn $ "Result: " ++ show r - putStrLn $ "Result: " ++ show function +SafeLang10.hs:9:13: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [overlapping] [safe] Pos [Int] + -- Defined at SafeLang10_B.hs:14:30 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance Pos [a] -- Defined at SafeLang10_A.hs:14:10 + • In the expression: res [(1 :: Int)] + In an equation for ‘r’: r = res [(1 :: Int)] + In the expression: + do let r = res ... + putStrLn $ "Result: " ++ show r + putStrLn $ "Result: " ++ show function diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs index 7be17b5ec0..9a94458c7e 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Trustworthy #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs index d9a8f63f50..5b9aa814cb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs index ba5766b064..930257a7e0 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TemplateHaskell #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr index c7923a0403..33bf7ce3fe 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr @@ -1,8 +1,8 @@ -SafeLang12.hs:2:14: warning: +SafeLang12.hs:3:14: warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell -SafeLang12_B.hs:2:14: warning: +SafeLang12_B.hs:3:14: warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell [1 of 3] Compiling SafeLang12_A ( SafeLang12_A.hs, SafeLang12_A.o ) [2 of 3] Compiling SafeLang12_B ( SafeLang12_B.hs, SafeLang12_B.o ) diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs index 3122859b59..9d6ce5cdb3 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module SafeLang12_A ( A ) where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs index 7219b7a200..50e7930c2d 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TemplateHaskell #-} module SafeLang12_B ( Class(..), mkSimpleClass ) where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs index 78708da6ac..cbcb7a376a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr index e15b20bb18..5aaab72d8a 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang16.stderr @@ -1,3 +1,3 @@ -SafeLang16.hs:1:14: - Warning: -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell +SafeLang16.hs:2:14: warning: + -XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs index 411addd00c..1fb79da713 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} module Main where diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr index 3585721654..1aab52a646 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr @@ -2,19 +2,19 @@ [2 of 3] Compiling SafeLang17_B ( SafeLang17_B.hs, SafeLang17_B.o ) [3 of 3] Compiling Main ( SafeLang17.hs, SafeLang17.o ) -SafeLang17.hs:8:13: - Unsafe overlapping instances for Pos [Int] - arising from a use of ‘res’ - The matching instance is: - instance [incoherent] [safe] Pos [Int] - -- Defined at SafeLang17_B.hs:14:10 - It is compiled in a Safe module and as such can only - overlap instances from the same module, however it - overlaps the following instances from different modules: - instance Pos [a] -- Defined at SafeLang17_A.hs:13:10 - In the expression: res [(1 :: Int)] - In an equation for ‘r’: r = res [(1 :: Int)] - In the expression: - do let r = res ... - putStrLn $ "Result: " ++ show r - putStrLn $ "Result: " ++ show function +SafeLang17.hs:9:13: error: + • Unsafe overlapping instances for Pos [Int] + arising from a use of ‘res’ + The matching instance is: + instance [incoherent] [safe] Pos [Int] + -- Defined at SafeLang17_B.hs:15:10 + It is compiled in a Safe module and as such can only + overlap instances from the same module, however it + overlaps the following instances from different modules: + instance Pos [a] -- Defined at SafeLang17_A.hs:14:10 + • In the expression: res [(1 :: Int)] + In an equation for ‘r’: r = res [(1 :: Int)] + In the expression: + do let r = res ... + putStrLn $ "Result: " ++ show r + putStrLn $ "Result: " ++ show function diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs index 0ce2bdf6b9..ef506e3b57 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_A.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs index 2059f01523..b18192c0fb 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang17_B.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs index 330a80d069..ad11681da8 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang18.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Safe #-} diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs index 175365c17c..d1026ea55f 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module System.IO.Unsafe to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr index 7c5128d7e2..8afd025680 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr @@ -1,4 +1,4 @@ -BadImport01.hs:5:1: +BadImport01.hs:6:1: error: System.IO.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs index e64a7ea09b..d912b7da73 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Debug.Trace to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr index 51a5bebec3..06995b8f2c 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr @@ -1,4 +1,4 @@ -BadImport06.hs:5:1: +BadImport06.hs:6:1: error: Debug.Trace: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs index da0f440a50..5e29dad2bb 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Unsafe.Coerce to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr index 5133f045ec..4782befae7 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr @@ -1,4 +1,4 @@ -BadImport07.hs:5:1: +BadImport07.hs:6:1: error: Unsafe.Coerce: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs index d2688fab80..338e1e13df 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Control.ST to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr index aa8b5a57f4..5c45d2ab6a 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr @@ -1,4 +1,4 @@ -BadImport08.hs:5:1: +BadImport08.hs:6:1: error: Control.Monad.ST.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs index 90d1c49090..2db8642d46 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import unsafe module Control.ST to make sure it fails module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr index 88556c8997..91611c0fcc 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr @@ -1,4 +1,4 @@ -BadImport09.hs:5:1: +BadImport09.hs:6:1: error: Control.Monad.ST.Lazy.Unsafe: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs index 1d64daa5ae..1d868c3e9e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UnboxedTuples #-} diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr index 4c93c907e8..fb3cb5eecd 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr @@ -1,3 +1,3 @@ -Dep05.hs:6:1: error: +Dep05.hs:7:1: error: GHC.Arr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs index 2dbb15e197..42da25b2f3 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep06 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr index ae8bdf8fd6..7824935d91 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr @@ -1,3 +1,3 @@ -Dep06.hs:4:1: +Dep06.hs:5:1: error: GHC.Conc: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs index 662b6a4754..0a2309190e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep07 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr index dcc7c4849d..cf79a18f6e 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr @@ -1,4 +1,4 @@ -Dep07.hs:4:1: +Dep07.hs:5:1: error: GHC.ForeignPtr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs index 76a0dde570..19bf730952 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Dep08 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr index 386f6412c3..09fa7d86ee 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr @@ -1,4 +1,4 @@ -Dep08.hs:5:1: +Dep08.hs:6:1: error: GHC.IOArray: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs index a92f739b50..a5808d4680 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep09 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr index 76606c2e40..4c776d3832 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr @@ -1,3 +1,3 @@ -Dep09.hs:4:1: +Dep09.hs:5:1: error: GHC.Ptr: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs index 84a7adcff7..61dad2505d 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} module Dep10 where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr index 68fe214bc8..af1627c985 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr +++ b/testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr @@ -1,3 +1,3 @@ -Dep10.hs:4:1: +Dep10.hs:5:1: error: GHC.ST: Can't be safely imported! The module itself isn't safe. diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs index 7834de52bc..276f183a59 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport01.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import SYB stuff that should be safe module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs index 86c34adb0d..c8ebcd4833 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} -- | Import (now safe by default) modules. module Main where diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs index 2ea80fbd09..2a89ee2d91 100644 --- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs +++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE Safe #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} -- | Import all modules from prelude that should be safe |