diff options
author | David Terei <code@davidterei.com> | 2014-11-12 16:11:39 -0800 |
---|---|---|
committer | David Terei <code@davidterei.com> | 2014-11-12 17:49:42 -0800 |
commit | 475dd93efa5158a0f9516f6819a24edfc30c1a76 (patch) | |
tree | c4f3fc0a526056dffb275d7bf9c9e142755559ac /testsuite | |
parent | 1f8b4ee074b4d9e3d847b3139dc89fff1bb5d2e6 (diff) | |
download | haskell-475dd93efa5158a0f9516f6819a24edfc30c1a76.tar.gz |
Add `--fwarn-trustworthy-safe` to `-Wall`
Update submodule haskell2010, haskell98, hoop, hpc and stm to fix new
warnings.
Diffstat (limited to 'testsuite')
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs new file mode 100644 index 0000000000..12be9b174c --- /dev/null +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE Trustworthy #-} +{-# OPTIONS_GHC -Wall #-} + +-- | This module is marked trustworthy but should be inferable as -XSafe. +-- Warning enabled through `-W`. +module TrustworthySafe03 where + +g :: Int +g = 1 + diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr new file mode 100644 index 0000000000..9505d06031 --- /dev/null +++ b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr @@ -0,0 +1,3 @@ + +TrustworthySafe03.hs:1:14: Warning: + ‘TrustworthySafe03’ is marked as Trustworthy but has been inferred as safe! diff --git a/testsuite/tests/safeHaskell/safeInfered/all.T b/testsuite/tests/safeHaskell/safeInfered/all.T index 89062cd174..12e80a7fde 100644 --- a/testsuite/tests/safeHaskell/safeInfered/all.T +++ b/testsuite/tests/safeHaskell/safeInfered/all.T @@ -76,6 +76,7 @@ test('Mixed03', normal, compile_fail, ['']) # Trustworthy Safe modules test('TrustworthySafe01', normal, compile, ['']) test('TrustworthySafe02', normal, compile, ['']) +test('TrustworthySafe03', normal, compile, ['']) test('TrustworthySafe04', normal, compile, ['']) # Check -fwarn-unsafe works |