
#15790: String literals are not escaped in -ddump-splices -------------------------------------+------------------------------------- Reporter: michalrus | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- For example, with this code: `Main.hs`: {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices -ddump-to-file #-} module Main where main :: IO () main = do putStrLn $( [| "\n\n\n" |] ) putStrLn $( [| "\"" |] ) }}} This is output: `Main.dump-splices`: {{{ Main.hs:8:15-28: Splicing expression [| "\n\n\n" |] ======> " " Main.hs:9:15-24: Splicing expression [| "\"" |] ======> """ }}} … which is not valid Haskell. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15790 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler