
#14880: GHC panic: updateRole -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler (Type | Version: 8.2.2 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #15076 | Differential Rev(s): Phab:D4769 Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Replying to [comment:108 simonpj]:
But Simon's approach applied to your patch doesn't
Gah! This zombie keeps rising from the dead.
I suggest
'''Step 1''': improve `tyCoVarsOfType`.
* Apply my patch to HEAD, with the fix in `ty_co_vars_of_co_var`. * Check that it's a win -- generally perf should improve slightly * Commit
Now move on to this ticket
'''Step 2:''' deal with `Note [Closing over free variable kinds]` (this note is in Richard's original patch).
This is a change that fixes an outright bug, albeit one that has not been reported. I think it is nothing to do with the original `updateRole`
Yes. This should be fairly straightforward - that part of the whole thing I completely understand, so I should be able to do that rather easily. It gets a bit tricky combining this part with other changes that also factor out a `tcvs_of_type` style worker, but I believe none of these changes are currently in HEAD. problem.
* Invite Richard to implement `Note [Closing over free variable kinds]`
in `TyCoRep`, based on his patch. This will take him (or me) 20 mins. I think the only changes are in `TyCoRep`.
* Do perf tests.
'''Step 3'''. Back to this ticket and `updateRole`:
* Apply the rest of Richard's patch, ''except'' the stuff in `TyCoRep` * Test
Is Step 2 the part where you close over kinds at the end rather than in between? Because that also seems fairly straightforward, it's just a simple `closeOverKinds` implementation, and then factoring out workers for the various `tyCoVarsOf...` functions and wrapping them with `closeOverKinds` appropriately. The rest of Richard's patch is what goes over my head. Other than that, yes, this sounds like a solid plan. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14880#comment:110 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler