[commit: ghc] ghc-8.0: Give lifted primitive types a representation (2c5a5fc)
git at git.haskell.org
git at git.haskell.org
Sat May 21 09:22:05 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/2c5a5fc14300e1615bde63f4ba63c98727442061/ghc
>---------------------------------------------------------------
commit 2c5a5fc14300e1615bde63f4ba63c98727442061
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Thu May 19 21:05:30 2016 +0200
Give lifted primitive types a representation
As of D1774 everything in GHC.Prim has a representation generated for it
by TcTypeable (see #11120). Unfortunately I evidently missed propagating
this change to lifted primitive types. This patch fixes this (#12082).
Test Plan: Validate
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2240
GHC Trac Issues: #12082
(cherry picked from commit a88bb1b1518389817583290acaebfd6454aa3cec)
>---------------------------------------------------------------
2c5a5fc14300e1615bde63f4ba63c98727442061
compiler/types/TyCon.hs | 3 ++-
testsuite/tests/typecheck/should_run/all.T | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index 69a9360..8954102 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -1322,7 +1322,8 @@ mkLiftedPrimTyCon :: Name -> [TyBinder]
-> Kind -- ^ /result/ kind
-> [Role] -> TyCon
mkLiftedPrimTyCon name binders res_kind roles
- = mkPrimTyCon' name binders res_kind roles False Nothing
+ = mkPrimTyCon' name binders res_kind roles False (Just rep_nm)
+ where rep_nm = mkPrelTyConRepName name
mkPrimTyCon' :: Name -> [TyBinder]
-> Kind -- ^ /result/ kind
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index 9382cb1..03eb41a 100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -115,5 +115,5 @@ test('T11049', exit_code(1), compile_and_run, [''])
test('T11230', normal, compile_and_run, [''])
test('TypeOf', normal, compile_and_run, [''])
test('TypeRep', normal, compile_and_run, [''])
-test('T11120', expect_broken(12082), compile_and_run, [''])
+test('T11120', normal, compile_and_run, [''])
test('KindInvariant', normal, ghci_script, ['KindInvariant.script'])
More information about the ghc-commits
mailing list