Here-docs in Haskell source

Ian Zimmerman itz at madbat.mine.nu
Sat Sep 23 18:00:21 EDT 2006


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

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

Hmm, you're right.  I myself know of only one such language, Pascal
(and its derivatives, such as Ada), but Pascal should definitely
be handled by Emacs.  I'll have to take a look at the Pascal mode
to see how they do it.

Still, I prefer the other syntax :-)
(single double quotes with a pseudo operator prefix).

-- 
She had a passion for anyone who could do anything really well.
...                "Not for an engineer, not for a technician!"
                    Mikhail Bulgakov, The Master & Margarita


More information about the Haskell-prime mailing list