literate comments

ajb at ajb at
Wed Oct 15 22:44:04 EDT 2003

G'day all.

Quoting Steffen Mazanek <steffen.mazanek at>:

> Would it make sense, to add a xml like code environment
> as well, e.g., <code>...</code>?

It's hard to say.  The problem is that some Haskell characters are also
important for XML (e.g. <, &) and so you can't just cut and paste valid
Haskell inside a <code>...</code> wrapper and expect it to work without
some additional markup.

You may be able to get away with putting your code in PIs like this:

            main = putStrLn "Hello world!"

That, of course, is assuming that you want the XML processor to treat
your code as a PI and not as CDATA.

Was there something specific you wanted to do?

Andrew Bromage

More information about the Haskell mailing list