summaryrefslogtreecommitdiff
path: root/testsuite/tests/unboxedsums
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-07-31 22:33:24 -0400
committerBen Gamari <ben@smart-cactus.org>2017-08-01 08:57:15 -0400
commit5a7af95ad2ce38e4b80893d869948c630454683b (patch)
tree7453c3d488fa6b7292166e864dd2114e4f68367b /testsuite/tests/unboxedsums
parent7a74f5053fa0972b8ce191f7492e1692f09c2e1d (diff)
downloadhaskell-5a7af95ad2ce38e4b80893d869948c630454683b.tar.gz
KnownUniques: Handle DataCon wrapper names
For some reason these weren't handled. I seem to remember thinking I had a reason for omitting them when writing the original patch, but I don't recall what that reason was at this point and clearly workers do show up in interface files. Test Plan: Validate against T14051 Reviewers: austin Subscribers: rwbarton, thomie, RyanGlScott GHC Trac Issues: #14051 Differential Revision: https://phabricator.haskell.org/D3805
Diffstat (limited to 'testsuite/tests/unboxedsums')
-rw-r--r--testsuite/tests/unboxedsums/T14051.hs10
-rw-r--r--testsuite/tests/unboxedsums/T14051a.hs6
-rw-r--r--testsuite/tests/unboxedsums/all.T1
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/unboxedsums/T14051.hs b/testsuite/tests/unboxedsums/T14051.hs
new file mode 100644
index 0000000000..96662a946e
--- /dev/null
+++ b/testsuite/tests/unboxedsums/T14051.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE UnboxedSums #-}
+
+module Main where
+
+import T14051a
+
+main :: IO ()
+main = print $ case func () of
+ (# True | #) -> 123
+ _ -> 321
diff --git a/testsuite/tests/unboxedsums/T14051a.hs b/testsuite/tests/unboxedsums/T14051a.hs
new file mode 100644
index 0000000000..b88f70ea05
--- /dev/null
+++ b/testsuite/tests/unboxedsums/T14051a.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE UnboxedSums #-}
+
+module T14051a where
+
+func :: s -> (# Bool | Bool #)
+func _ = (# True | #)
diff --git a/testsuite/tests/unboxedsums/all.T b/testsuite/tests/unboxedsums/all.T
index eea818b6f1..45723cb4f0 100644
--- a/testsuite/tests/unboxedsums/all.T
+++ b/testsuite/tests/unboxedsums/all.T
@@ -32,3 +32,4 @@ test('T12711', only_ways(['ghci']), ghci_script, ['T12711.script'])
# ['$MAKE -s --no-print-directory sum_api_annots'])
test('UbxSumLevPoly', normal, compile, [''])
+test('T14051', normal, multi_compile, ['T14051.hs', [('T14051a.hs', '')], '-O2 -v0'])