GHC 6.2 breaks multiline string literals

Stefan Reich doc at drjava.de
Sun Dec 28 02:54:52 EST 2003


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.

-Stefan

Ferenc Wagner wrote:

> Stefan Reich <doc at drjava.de> writes:
> 
> 
>>multilineLiteral = "
>>   line1
>>   line2"
> 
> 
> Use string gaps (see 2.6 in the Report):
> 
> multilineLiteral = "\
> \   line1\n\
> \   line2"
> 



More information about the Glasgow-haskell-users mailing list