summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-03-11 00:27:45 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-12 09:46:29 -0400
commit3a259092a02e84d6b45da6b232cfc022898451a0 (patch)
tree8b6327e34c09d14f351fcbeedc3354f4e17699e2 /testsuite
parent5cb93af73499f9cee4a17427629840feb26171e5 (diff)
downloadhaskell-3a259092a02e84d6b45da6b232cfc022898451a0.tar.gz
Expose compulsory unfoldings always
The unsafeCoerce# patch requires that unsafeCoerce# has a compulsory unfolding that is always available. So we have to be careful to expose compulsory unfoldings unconditionally and consistently. We didn't get this quite right: #17871. This patch fixes it. No real surprises here. See Note [Always expose compulsory unfoldings] in GHC.Iface.Tidy
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/showIface/T17871.hs5
-rw-r--r--testsuite/tests/showIface/T17871a.hs9
-rw-r--r--testsuite/tests/showIface/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/showIface/T17871.hs b/testsuite/tests/showIface/T17871.hs
new file mode 100644
index 0000000000..bc2b0c791a
--- /dev/null
+++ b/testsuite/tests/showIface/T17871.hs
@@ -0,0 +1,5 @@
+module T17871 where
+
+import T17871a
+
+instance C ()
diff --git a/testsuite/tests/showIface/T17871a.hs b/testsuite/tests/showIface/T17871a.hs
new file mode 100644
index 0000000000..151e994690
--- /dev/null
+++ b/testsuite/tests/showIface/T17871a.hs
@@ -0,0 +1,9 @@
+-- A.hs
+module T17871a (C(..)) where
+
+class C a where
+ m :: a -> a
+ m = identity
+
+identity :: a -> a
+identity x = x
diff --git a/testsuite/tests/showIface/all.T b/testsuite/tests/showIface/all.T
index 34550f696b..e2ec264431 100644
--- a/testsuite/tests/showIface/all.T
+++ b/testsuite/tests/showIface/all.T
@@ -5,3 +5,4 @@ test('DocsInHiFile0',
test('DocsInHiFile1',
extra_files(['DocsInHiFile.hs']),
makefile_test, ['DocsInHiFile1'])
+test('T17871', [extra_files(['T17871a.hs'])], multimod_compile, ['T17871', '-v0'])