Skip to content
  • Simon Peyton Jones's avatar
    Add showMultiLineString to GHC.Show · 4041be61
    Simon Peyton Jones authored
    This is part of the fix for #4436
    
      showMultiLineString :: String -> [String]
      -- | Like 'showLitString' (expand escape characters using Haskell
      -- escape conventions), but 
      --   * break the string into multiple lines
      --   * wrap the entire thing in double quotes
      -- Example:  @breakMultiLineString "hello\ngoodbye\nblah"@ 
      -- returns   @["\"hello\\", "\\goodbye\\", "\\blah\"" ]@
      -- where those "\\" are really just a single backslash
      -- (but I'm writing them here as Haskell literals)
    4041be61