
#9022: TH pretty printer and GHC parser semicolon placement mismatch -------------------------------------+------------------------------------- Reporter: roldugin | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Template | Version: 7.8.1 Haskell | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHC | Related Tickets: rejects valid program | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by roldugin): You're right! `let` expressions should be fine: {{{
pprint <$> runQ [| let { x = 3; y = 4 } in x + y |] "let {x_0 = 3; y_1 = 4}\n in x_0 GHC.Num.+ y_1" }}}
But there is indeed a problem with `let` statements: {{{
pprint <$> runQ [| do let { x = 3; y = 4 } ; return (x + y) |] "do {let {x_0 = 3}; {y_1 = 4}; GHC.Base.return (x_0 GHC.Num.+ y_1)}" }}}
I think pretty printing `LetS` will need to use custom `pprDecs` like `LetE` does around line 149. Unfortunately, I can't do it right now but I will when I get a minute. George -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9022#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler