
#9291: Don't reconstruct sum types if the type subtly changes ----------------------------+---------------------------------------------- Reporter: schyler | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.8.2 Component: | Keywords: Compiler | Architecture: Unknown/Multiple Resolution: | Difficulty: Moderate (less than a day) Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by nomeata): The type system of Core is actually _better_ than that of Haskell (for some value of better). And having a typed intermediate language has many benefits, e.g. it is easier to spot bugs in the core-to-core transformations. An example for what happens when you use unsafeCoerce, even internally: GeneralizedNewtypeDeriving used to be implemented this way, and together with Type Families or GADTS it was suddenly possible to crash a Haskell program. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9291#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler