patch applied (packages/base): Add showMultiLineString to GHC.Show

Simon Peyton Jones simonpj at microsoft.com
Tue Oct 26 06:08:45 EDT 2010


Mon Oct 25 08:16:55 PDT 2010  simonpj at microsoft.com
  * Add showMultiLineString to GHC.Show
  
  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)

    M ./GHC/Show.lhs -11 +37

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=packages/base;a=darcs_commitdiff;h=20101025151655-1287e-a0ef119de3520e31b9086e566f50b0b7f5655385.gz


More information about the Cvs-libraries mailing list