
#9090: Untouchable higher-kinded type variable in connection with RankNTypes, ConstraintKinds and TypeFamilies -------------------------------------+------------------------------------- Reporter: kosmikus | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 (Type checker) | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHC | Related Tickets: rejects valid program | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Reason: * We have a given `D (Eq a)` * Flattened to `fsk` (a `CIrredCan`) plus work-list `D (Eq a) ~ fsk`. * The `CIrredCan` fsk is put in the inert set * ...and that flips `No-eqs` to `False` * We solve `D (Eq a) ~ fsk`, getting `fsk ~ Eq a` * That kicks out the `CIrredCan` so it can be substituted * But it is too late! The no-eqs flag has been flipped. Solution: the no-eqs flag should be computed from the final inert set, not the process. Will be fixed by the same fix as #9211 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9090#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler