
#14880: GHC panic: updateRole -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: 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: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): The `updateRole` panic triggers on various invalid-tycon problems. I'm not surprised that roles aren't involved. Yes, a `forall` to the right of the `::` in a data declaration makes fine sense. For example, here is one way to define heterogeneous equality: {{{#!hs data (:~~:) :: forall k1. k1 -> forall k2. k2 -> Type where HRefl :: a :~~: a }}} This definition is actually a touch more general than one where `k1` and `k2` are quantified prenex, as the "Practical Type Inference" paper explains. I don't see a need to document this specially. As for the toposorting suggestions: I've considered it a design principle that implicit quantification comes before all explicit quantification. Of course, we can't panic when something goes wrong here, but I think this design is a good one, just to have some rules that users can rely on. My existing patch still panics on this case, but I agree that no one should spend time on this until that patch lands. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14880#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler