Here-docs in Haskell source

Alistair Bayley alistair at abayley.org
Sat Sep 23 16:31:17 EDT 2006


On 22 Sep 2006 23:54:42 -0400, Ian Zimmerman <itz at madbat.mine.nu> wrote:
>
> Here's a quick test: put the cursor in front of a triple-quoted string,
> then hit Control-Alt-F (forward-sexp).  It should move just after the
> whole string.  Does it?
>
> Any tool which assumes strings are delimited by a single front delimiter
> and a single end delimiter, which they are in most reasonable languages,
> will have trouble.

(just speculating here...)

In order to produce one double-quote inside a double-quote delimited
string, many (most?) languages let you use two adjacent double quotes.
So a string starting with triple double-quote would result in a string
that has one double quote as its first char.

I imagine that smarter language-aware editors would handle this case,
otherwise they would not correctly recognise whether or not the cursor
was inside a string literal.

Alistair


More information about the Haskell-prime mailing list