[commit: ghc] ghc-8.2: typecheck: Consider types containing coercions non-Typeable (40cb68a)
git at git.haskell.org
git at git.haskell.org
Thu Jun 29 17:54:16 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/40cb68a606ceb082815b2452bfb4eac6ea57522b/ghc
>---------------------------------------------------------------
commit 40cb68a606ceb082815b2452bfb4eac6ea57522b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Jun 27 10:29:33 2017 -0400
typecheck: Consider types containing coercions non-Typeable
This was previously a panic and caused #13871. I believe just saying
these types simply aren't Typeable should be correct.
Test Plan: Validate, check `T13871`
Reviewers: goldfire, austin
Subscribers: rwbarton, thomie, RyanGlScott
GHC Trac Issues: #13871
Differential Revision: https://phabricator.haskell.org/D3672
(cherry picked from commit 134652542923e432bffb9fafe87893d785a17aae)
>---------------------------------------------------------------
40cb68a606ceb082815b2452bfb4eac6ea57522b
compiler/typecheck/TcTypeable.hs | 2 +-
testsuite/tests/typecheck/should_compile/all.T | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs
index 8d8ea03..76d262c 100644
--- a/compiler/typecheck/TcTypeable.hs
+++ b/compiler/typecheck/TcTypeable.hs
@@ -438,7 +438,7 @@ typeIsTypeable (TyConApp tc args) = tyConIsTypeable tc
typeIsTypeable (ForAllTy{}) = False
typeIsTypeable (LitTy _) = True
typeIsTypeable (CastTy{}) = False
-typeIsTypeable (CoercionTy{}) = panic "typeIsTypeable(Coercion)"
+typeIsTypeable (CoercionTy{}) = False
-- | Maps kinds to 'KindRep' bindings. This binding may either be defined in
-- some other module (in which case the @Maybe (LHsExpr Id@ will be 'Nothing')
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 1da16fc..f8b86f8 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -554,4 +554,4 @@ test('T13603', normal, compile, [''])
test('T13333', normal, compile, [''])
test('T13585', [extra_files(['T13585.hs', 'T13585a.hs', 'T13585b.hs'])], run_command, ['$MAKE -s --no-print-directory T13585'])
test('T13804', normal, compile, [''])
-test('T13871', expect_broken(13871), compile, [''])
+test('T13871', normal, compile, [''])
More information about the ghc-commits
mailing list