summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs')
-rw-r--r--testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs20
1 files changed, 2 insertions, 18 deletions
diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs
index 0b42002b25..1e933ac3b0 100644
--- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs
+++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.hs
@@ -2,24 +2,8 @@
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE FlexibleInstances #-}
--- |
--- This module should actually fail to compile since we have the instances C
--- [Int] from the -XSafe module SafeInfered05_A overlapping as the most
--- specific instance the other instance C [a] from this module. This is in
--- violation of our single-origin-policy.
---
--- Right now though, the above actually compiles fine but *this is a bug*.
--- Compiling module SafeInfered05_A with -XSafe has the right affect of causing
--- the compilation of module SafeInfered05 to then subsequently fail. So we
--- have a discrepancy between a safe-inferred module and a -XSafe module, which
--- there should not be.
---
--- It does raise a question of if this bug should be fixed. Right now we've
--- designed Safe Haskell to be completely opt-in, even with safe-inference.
--- Fixing this of course changes this, causing safe-inference to alter the
--- compilation success of some cases. How common it is to have overlapping
--- declarations without -XOverlappingInstances specified needs to be tested.
---
+-- | We allow this overlap to succeed since the module is regarded as
+-- `-XUnsafe`.
module SafeInfered05 where
import safe SafeInfered05_A