summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/T18644.script
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-09-02 18:45:05 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2020-09-02 18:45:07 -0400
commit04c790496900f9985f8e33733769878384a9d831 (patch)
tree6b6910e98f6081cac4cb40d7e4e59a091e03998b /testsuite/tests/ghci/scripts/T18644.script
parent4b4fbc58d37d37457144014ef82bdd928de175df (diff)
downloadhaskell-04c790496900f9985f8e33733769878384a9d831.tar.gz
Introduce isBoxedTupleDataCon and use it to fix #18644wip/T18644
The code that converts promoted tuple data constructors to `IfaceType`s in `GHC.CoreToIface` was using `isTupleDataCon`, which conflates boxed and unboxed tuple data constructors. To avoid this, this patch introduces `isBoxedTupleDataCon`, which is like `isTupleDataCon` but only works for _boxed_ tuple data constructors. While I was in town, I was horribly confused by the fact that there were separate functions named `isUnboxedTupleCon` and `isUnboxedTupleTyCon` (similarly, `isUnboxedSumCon` and `isUnboxedSumTyCon`). It turns out that the former only works for data constructors, despite its very general name! I opted to rename `isUnboxedTupleCon` to `isUnboxedTupleDataCon` (similarly, I renamed `isUnboxedSumCon` to `isUnboxedSumDataCon`) to avoid this potential confusion, as well as to be more consistent with the naming convention I used for `isBoxedTupleDataCon`. Fixes #18644.
Diffstat (limited to 'testsuite/tests/ghci/scripts/T18644.script')
-rw-r--r--testsuite/tests/ghci/scripts/T18644.script3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T18644.script b/testsuite/tests/ghci/scripts/T18644.script
new file mode 100644
index 0000000000..e1fb4a86d8
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T18644.script
@@ -0,0 +1,3 @@
+:set -XDataKinds -XUnboxedTuples
+:kind! '(# #)
+:kind! '()