Haskell - Do literal backslashes always have to be escaped in a string? -



Haskell - Do literal backslashes always have to be escaped in a string? -

in haskell, in order represent literal string "\", 1 write:

"\\"

however, there way escape string such single backslash can written without needing escaped? example, can in c# pre-pending @ string:

@"\"

does haskell have equivalent?

no, see section 2.6 of haskell lexical structure.

haskell doesn't have raw strings, heredocs or triple strings. sorry. fanciness this:

"ab\ \cd" => "abcd"

white space between line-ending , -beginning slashes ignored. useful, example, if want emit inline html indented in haskell source, not overly indented in output. (not i'd advocate doing complicated html output way.)

string haskell

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -