[commit: ghc] ghc-8.4: Fix #14811 by wiring in $tcUnit# (0f78f18)
git at git.haskell.org
git at git.haskell.org
Mon Feb 19 20:06:28 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.4
Link : http://ghc.haskell.org/trac/ghc/changeset/0f78f18129d24f17154ae7dca84937fddd1f8b0c/ghc
>---------------------------------------------------------------
commit 0f78f18129d24f17154ae7dca84937fddd1f8b0c
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Fri Feb 16 13:51:27 2018 -0500
Fix #14811 by wiring in $tcUnit#
Previously, we were skipping over `$tcUnit#` entirely when
wiring in `Typeable` tycons, resulting in #14811. Easily fixed.
Test Plan: make test TEST=T14811
Reviewers: bgamari, dfeuer
Reviewed By: dfeuer
Subscribers: dfeuer, rwbarton, thomie, carter
GHC Trac Issues: #14811
Differential Revision: https://phabricator.haskell.org/D4414
(cherry picked from commit d5ac5820111bc957e72c8ce11e59d7cbbdd63526)
>---------------------------------------------------------------
0f78f18129d24f17154ae7dca84937fddd1f8b0c
compiler/typecheck/TcTypeable.hs | 5 ++---
testsuite/tests/typecheck/should_compile/T14811.hs | 5 +++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs
index 6fa875b..4c2a69a 100644
--- a/compiler/typecheck/TcTypeable.hs
+++ b/compiler/typecheck/TcTypeable.hs
@@ -345,9 +345,8 @@ mkPrimTypeableTodos
-- Note [Built-in syntax and the OrigNameCache] in IfaceEnv for more.
ghcPrimTypeableTyCons :: [TyCon]
ghcPrimTypeableTyCons = concat
- [ [ runtimeRepTyCon, vecCountTyCon, vecElemTyCon
- , funTyCon, tupleTyCon Unboxed 0 ]
- , map (tupleTyCon Unboxed) [2..mAX_TUPLE_SIZE]
+ [ [ runtimeRepTyCon, vecCountTyCon, vecElemTyCon, funTyCon ]
+ , map (tupleTyCon Unboxed) [0..mAX_TUPLE_SIZE]
, map sumTyCon [2..mAX_SUM_SIZE]
, primTyCons
]
diff --git a/testsuite/tests/typecheck/should_compile/T14811.hs b/testsuite/tests/typecheck/should_compile/T14811.hs
new file mode 100644
index 0000000..20c6ab9
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14811.hs
@@ -0,0 +1,5 @@
+{-# language UnboxedTuples #-}
+module T14811 where
+
+data Foo a = Foo (# a #)
+data Bar = Bar (# #)
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 9583bc5..f38a1ff 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -592,3 +592,4 @@ test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutio
test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('T14732', normal, compile, [''])
test('T14763', normal, compile, [''])
+test('T14811', normal, compile, [''])
More information about the ghc-commits
mailing list