summaryrefslogtreecommitdiff
path: root/testsuite/tests/showIface/T17871a.hs
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/tests/showIface/T17871a.hs
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/tests/showIface/T17871a.hs')
-rw-r--r--testsuite/tests/showIface/T17871a.hs9
1 files changed, 9 insertions, 0 deletions
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