
#14270: GHC HEAD's ghc-stage1 panics on Data.Typeable.Internal -------------------------------------+------------------------------------- Reporter: hvr | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #14236 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I tried extending the rule matching substitution with the CvSubst from the unification. Unfortunately, it seems as though the unifier returns an empty CvSubst. Perhaps this is because of the fact that the template variable appears both in the LHS of the rule and the argument being matched. Consequently the unifier may not extend its CvSubst when unifying, since doing so would mean adding a substitution `cobox_a3S9 :-> cobox_a3S9` to the substitution. This would violate the invariant of matching that none of the template variables appear in the range of the resulting substitution (as described in, e.g., `Note [Matching in the presence of casts]`). Also, for future reference: The coercions in question come in to scope as the result of a pattern match on an `HRefl`, {{{#!hs case ds_d4wx of { HRefl cobox_a3S8 cobox_a3S9 -> ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14270#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler