
#10734: pprint of ‘let’ inside ‘do’ prints invalid Haskell -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Fuuzetsu): Also a problem on 7.10.2 The `Ppr` instance for `LetS` constructor is just not good enough. {{{#!hs Prelude Language.Haskell.TH.Ppr Language.Haskell.TH> pprint <$> runQ [| do { let { x = 5; y = 3 }; return x; } |] "do {let x_0 = 5\n y_1 = 3;\n GHC.Base.return x_0}" }}} Worst thing is that there is no easy way to override this… -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10734#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler