GHC 6.2 breaks multiline string literals

John Meacham john at repetae.net
Sat Dec 27 23:05:53 EST 2003


On Sun, Dec 28, 2003 at 02:54:52AM +0100, Stefan Reich wrote:
> Ferenc, thanks for your answer. It doesn't really solve my problem though...
> 
> 1. Your method doesn't preserve the line-breaks within the resulting string.
> 
> 2. Surrounding each line with special chars is actually what I want to 
> avoid.
> 
> What I'm looking for is something similar to Perl's << and PHP's <<< 
> operator.

I have also wanted something like that on several occasions. ideally,
I'd like something like python where.

foo = """
hello this is
preformatted text.
"""

will be the same as 
foo = "hello this is\npreformatted text.\n"


-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------


More information about the Glasgow-haskell-users mailing list