Commit 13465254 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

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:
parent 12a3c394
......@@ -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')
......@@ -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, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment