Hi Audrey,

are you aware that Haskell already supports multi-line strings?

foo = "This is a\
       \multi-line\
       \string!"

See Section 2.6 of http://haskell.org/onlinereport/lexemes.html

Regards,
  Jean

On 25.06.11 22:55, 唐鳳 wrote:
> Hi all,
> 
> I've just released string-qq 0.0.2 to Hackage:
> 
>      http://hackage.haskell.org/package/string-qq
> 
> The main interface is the "s" quasi-quoter:
> 
>      foo :: IsString a =>  a
>      foo = [s|
> This is a
> multi-line
> string!
> |]
> 
> It allows simple multi-line strings of any IsString type (Text, String, 
> ByteString, etc),
> with no interpolation at all, except that the leading newline is trimmed and
> "\r\n" sequences are converted to "\n".
> 
> It's compatible with both GHC6 and GHC7; for GHC6, write [$s|…|] instead of 
> [s|…|].
> 
> Suggestions and feedback are most welcome. :-)
> 
> Cheers,
> Audrey
> 
> _______________________________________________
> Haskell mailing list
> Haskell@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell


-- 
Jean-Marie Gaillourdet

blog:                                                  gaillourdet.net
{email, xmpp, jabber, ichat, gimix, gtalk}:        j...@gaillourdet.net

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to