
#11156: Type-changing record update catch-all in sum type doesn't typecheck -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.2 checker) | Resolution: invalid | 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 afarmer): Yeah, I figured it wouldn't be easy to fix, and the workaround isn't too onerous. However, it does seem like a bit of a wart. I had to stare at it for many minutes before I realized what was probably going on... the error seems really non-obvious unless you understand how record updates desugar, so I just wanted to document it. I wondered if the new overlapping/missing patterns algorithm could be adapted to spot the impossible case, but I'm sure the effort-to-payoff ratio is much too high. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11156#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler