summaryrefslogtreecommitdiff
path: root/testsuite/tests/unboxedsums
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2016-11-24 04:12:17 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2016-11-24 04:12:32 +0300
commit14ac3725eb1e93289f205cbf432b537f6c84c4dc (patch)
tree8b295ef296fec03aabe39456d52becb57c1aa189 /testsuite/tests/unboxedsums
parentf43025340d05d3c6085c41e441d278745f34a317 (diff)
downloadhaskell-14ac3725eb1e93289f205cbf432b537f6c84c4dc.tar.gz
Collect wildcards in sum types during renaming (#12711)
This patch also removes the "catch all" pattern in the function and explicitly lists constructors to get a warning in the future if a new `HsType` was added. Reviewers: bgamari, austin, simonpj Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2753 GHC Trac Issues: #12711
Diffstat (limited to 'testsuite/tests/unboxedsums')
-rw-r--r--testsuite/tests/unboxedsums/T12711.script2
-rw-r--r--testsuite/tests/unboxedsums/T12711.stdout1
-rw-r--r--testsuite/tests/unboxedsums/all.T1
3 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/unboxedsums/T12711.script b/testsuite/tests/unboxedsums/T12711.script
new file mode 100644
index 0000000000..898fdc106a
--- /dev/null
+++ b/testsuite/tests/unboxedsums/T12711.script
@@ -0,0 +1,2 @@
+:set -XUnboxedSums
+:kind (# _ | _ #)
diff --git a/testsuite/tests/unboxedsums/T12711.stdout b/testsuite/tests/unboxedsums/T12711.stdout
new file mode 100644
index 0000000000..13070dfe77
--- /dev/null
+++ b/testsuite/tests/unboxedsums/T12711.stdout
@@ -0,0 +1 @@
+(# _ | _ #) :: TYPE 'GHC.Types.UnboxedSumRep
diff --git a/testsuite/tests/unboxedsums/all.T b/testsuite/tests/unboxedsums/all.T
index ed4108433c..290ae43263 100644
--- a/testsuite/tests/unboxedsums/all.T
+++ b/testsuite/tests/unboxedsums/all.T
@@ -22,6 +22,7 @@ test('thunk', only_ways(['normal']), compile_and_run, [''])
test('T12375', only_ways(['normal']), compile_and_run, [''])
test('empty_sum', only_ways(['normal']), compile_and_run, [''])
test('sum_rr', normal, compile_fail, [''])
+test('T12711', only_ways(['ghci']), ghci_script, ['T12711.script'])
# TODO: Need to run this in --slow mode only
# test('sum_api_annots',