[commit: ghc] master: typecheck: Consider types containing coercions non-Typeable (1346525)
git at git.haskell.org
git at git.haskell.org
Tue Jun 27 17:34:48 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/134652542923e432bffb9fafe87893d785a17aae/ghc
>---------------------------------------------------------------
commit 134652542923e432bffb9fafe87893d785a17aae
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
>---------------------------------------------------------------
134652542923e432bffb9fafe87893d785a17aae
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 64db97c..e7a427f 100644
--- a/compiler/typecheck/TcTypeable.hs
+++ b/compiler/typecheck/TcTypeable.hs
@@ -439,7 +439,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 5c3b323..72d33c1 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -564,4 +564,4 @@ test('T13651', normal, compile, [''])
test('T13785', normal, compile, [''])
test('T13804', normal, compile, [''])
test('T13822', normal, compile, [''])
-test('T13871', expect_broken(13871), compile, [''])
+test('T13871', normal, compile, [''])
More information about the ghc-commits
mailing list