
I actually proposed doing exactly that when working this out with Simon. The problem is that doing so would ruin error messages, because we could report errors only with respect to the expanded syntax, instead of what
#14963: ghci -fdefer-type-errors can't run IO action from another module -------------------------------------+------------------------------------- Reporter: elaforge | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.4.2 Component: GHCi | Version: 8.4.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 tdammers): Replying to [comment:13 goldfire]: the user actually wrote. My gut feeling (by all means correct me if I'm wrong!) is that this would still amount to a more elegant solution, everything considered. We would have to extend `HsSyn` to retain the original (sugared) notation, and treat such annotated syntax specially when printing error messages, but as far as type checking etc. are concerned, I would expect this to be mostly transparent. Personally, I wouldn't even mind getting error messages in desugared form, but I can understand if others feel strongly about this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14963#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler