#11608: Possible type-checker regression in GHC 8.0 when compiling `microlens` -------------------------------------+------------------------------------- Reporter: hvr | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"7496be5c0ab96bcc9ab70ab873aa561674b7789d/ghc" 7496be5c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7496be5c0ab96bcc9ab70ab873aa561674b7789d" Exclude TyVars from the constraint solver There is a general invariant that the constraint solver doesn't see TyVars, only TcTyVars. But when checking the generic-default signature of a class, we called checkValidType on the generic-default type, which had the class TyVar free. That in turn meant that it wasn't considered during flattening, which led to the error reported in Trac #11608. The fix is simple: call checkValidType on the /closed/ type. Easy. While I was at it, I added a bunch of ASSERTs about the TcTyVar invariant. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11608#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler