Add `--fwarn-trustworthy-safe` to `-Wall`
authorDavid Terei <code@davidterei.com>
Thu, 13 Nov 2014 00:11:39 +0000 (16:11 -0800)
committerDavid Terei <code@davidterei.com>
Thu, 13 Nov 2014 01:49:42 +0000 (17:49 -0800)
Update submodule haskell2010, haskell98, hoop, hpc and stm to fix new
warnings.

compiler/main/DynFlags.hs
libraries/haskell2010
libraries/haskell98
libraries/hoopl
libraries/hpc
libraries/stm
mk/validate-settings.mk
testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs [new file with mode: 0644]
testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.stderr [new file with mode: 0644]
testsuite/tests/safeHaskell/safeInfered/all.T

index 043174f..70fc6d3 100644 (file)
@@ -3154,7 +3154,8 @@ minusWallOpts
         Opt_WarnMissingSigs,
         Opt_WarnHiShadows,
         Opt_WarnOrphans,
-        Opt_WarnUnusedDoBind
+        Opt_WarnUnusedDoBind,
+        Opt_WarnTrustworthySafe
       ]
 
 enableGlasgowExts :: DynP ()
index 425df1d..a21abff 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 425df1d9ea7adcf823bbb5426528bd80eb2b820e
+Subproject commit a21abff3e385a85e1353aa720516e148865710a1
index 401283a..cf064d9 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 401283a98a818f66f856939f939562de5c4a2b47
+Subproject commit cf064d954c511a2edddb5a55a1984d57ce36c407
index 7f06b16..a90a3af 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7f06b16ba3a49c2c927fb06fe7dc89089dd7e29f
+Subproject commit a90a3af92be400af8912555bce21b041a1c48ad4
index d430be4..60e7bbf 160000 (submodule)
@@ -1 +1 @@
-Subproject commit d430be4664aac337cd0e49dd6b69e818f21cde6b
+Subproject commit 60e7bbfeea8ba54688b8f432f0f337b275f06c58
index 40fd6d8..6b63e91 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 40fd6d88f75c31b66419ab93f436225c9403846c
+Subproject commit 6b63e91b2b0b7d7b4bef654117da62c22cac34da
index 52aa648..150aec3 100644 (file)
@@ -163,6 +163,13 @@ libraries/dph/dph-lifted-common-install_EXTRA_HC_OPTS += -Wwarn
 # We need to turn of deprecated warnings for SafeHaskell transition
 libraries/array_dist-install_EXTRA_HC_OPTS += -fno-warn-warnings-deprecations
 
+# Turn of trustworthy-safe warning
+libraries/base_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+libraries/process_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+libraries/unix_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+
 # Temporarely disable inline rule shadowing warning
 libraries/bytestring_dist-install_EXTRA_HC_OPTS += -fno-warn-inline-rule-shadowing
 libraries/template-haskell_dist-install_EXTRA_HC_OPTS += -fno-warn-inline-rule-shadowing
diff --git a/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs b/testsuite/tests/safeHaskell/safeInfered/TrustworthySafe03.hs
new file mode 100644 (file)
index 0000000..12be9b1
--- /dev/null
@@ -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 (file)
index 0000000..9505d06
--- /dev/null
@@ -0,0 +1,3 @@
+
+TrustworthySafe03.hs:1:14: Warning:
+    ‘TrustworthySafe03’ is marked as Trustworthy but has been inferred as safe!
index 89062cd..12e80a7 100644 (file)
@@ -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