
#13264: GHC panic with (->) generalization branch while compiling lens -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): I have a terrible idea. Consider a unification variable (`MetaTv`) `alpha`. After `alpha` is filled in, say with `Int`, GHC should consider `alpha` and `Int` to be the same in all contexts. To achieve this, GHC must be very careful to zonk in just the right places. What if, instead, we use `unsafePerformIO` to zonk on the fly, whenever `coreView` is used? `coreView` looks through type synonyms, so it is currently put wherever we need to know about the "real" type -- in equality checks, splitting, etc. These places seem precisely the places where zonking is important. So we teach `coreView` how to zonk! Or, perhaps, we resurrect `tcView` (which was removed because it was just the same as `coreView`) so that this zonk-on-the-fly behavior happens only in the typechecker. Now, this idea (because it requires `unsafePerformIO`) goes against my grain. But what's actually wrong with it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13264#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler