
#13804: MonoLocalBinds/RankNTypes type inference regression in GHC 8.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler (Type | Version: 8.2.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: #11698 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I see what is happening here. We have {{{ f periph = let sr :: forall a. [a] -> [a] sr = ... periph ... sr' = sr in ... }}} Can we do type inference for `sr'`? Of course! Its only free var is `sr` which has a closed type. But from the point of view of static pointers, `sr'` mentions `sr` and `sr` mentions `periph`, so they could not be floated out. So they aren't closed in that sense. We were mixing the two up. Fix incoming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13804#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler