Synchronize ClsInst.doTyConApp with TcTypeable validity checks (#15862)
Issue #15862 (closed) demonstrated examples of type constructors on which
TcTypeable.tyConIsTypeable
would return False
, but the Typeable
constraint solver in ClsInst
(in particular, doTyConApp
) would
try to generate Typeable
evidence for anyway, resulting in
disaster. This incongruity was caused by the fact that doTyConApp
was using a weaker validity check than tyConIsTypeable
to determine
if a type constructor warrants Typeable
evidence or not. The
solution, perhaps unsurprisingly, is to use tyConIsTypeable
in
doTyConApp
instead.
To avoid import cycles between ClsInst
and TcTypeable
, I factored
out tyConIsTypeable
into its own module, TcTypeableValidity
.
Fixes #15862 (closed).
Merge request reports
Activity
added Typeable label
mentioned in issue #15862 (closed)
added 3 commits
-
3f298aa7...5279dda8 - 2 commits from branch
ghc:master
- 57c7e898 - Synchronize ClsInst.doTyConApp with TcTypeable validity checks (#15862 (closed))
-
3f298aa7...5279dda8 - 2 commits from branch
changed milestone to %8.8.1
assigned to @marge-bot
I will attempt to batch this MR (!1208 (closed))...
Batch MR !1208 (closed) failed: CI failed! I will retry later...
I will attempt to batch this MR (!1209 (closed))...
Batch MR !1209 (closed) failed: CI failed! I will retry later...
I will attempt to batch this MR (!1210 (closed))...
Batch MR !1210 (closed) failed: CI failed! I will retry later...
I will attempt to batch this MR (!1212 (closed))...
Merged in 25ee60cd
- Resolved by Ryan Scott
- Resolved by Ryan Scott