[Haskell-cafe] Multi Line String literals
Stefan O'Rear
stefanor at cox.net
Thu Apr 26 09:09:58 EDT 2007
On Thu, Apr 26, 2007 at 01:43:09PM +0100, Joe Thornber wrote:
> On 26/04/07, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> >test = putStrLn $ toIsString $ do "I"
> > "need"
> > "MultiLine"
> > "String"
> > "literals!"
>
> but it's simpler to just write something like:
>
> test = putStr $ unlines ["I",
> "need",
> "multiline",
> "string",
> "literals"]
How does
test = putStr "I\n\
\need\n\
\multiline\n\
\string\n\
\literals\n"
look?
Stefan
More information about the Haskell-Cafe
mailing list