literate comments

ajb at spamcop.net ajb at spamcop.net
Wed Oct 15 22:44:04 EDT 2003


G'day all.

Quoting Steffen Mazanek <steffen.mazanek at unibw-muenchen.de>:

> 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:

        <?code
            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?

Cheers,
Andrew Bromage


More information about the Haskell mailing list