Here-docs in Haskell source
Simon Marlow
simonmar at microsoft.com
Thu Oct 19 07:27:26 EDT 2006
haskell-prime-bounces at haskell.org wrote:
> I would also like to see these. I like the python syntax
>
> """
> stuff...
> """
>
> but really most anything will do.
>
> the triple quote doesn't eat any usable syntax though and
> won't require
> any special cases in the parser so I would much prefer something like
> that.
Would someone like to make a ticket/wiki page for HereDocuments?
I suggest that here documents could supplant string gaps, which are a
pain both for the compiler and the user and interact badly with CPP. In
fact, I suggest removing string gaps anyway, since
"abc"++
"cde"++
...
is just as good as
"abc\
\cde\
...
GHC optimises the first to the second anyway. I find myself using
explicit ++ rather than string gaps these days, ever since the problems
with recent versions of GNU CPP and string gaps arose (yes I know cpphs
works with string gaps).
Cheers,
Simon
More information about the Haskell-prime
mailing list