[Haskell-beginners] Haddock and XML
Mateusz Kowalczyk
fuuzetsu at fuuzetsu.co.uk
Mon Apr 21 19:48:51 UTC 2014
On 04/21/2014 09:23 PM, Emanuel Koczwara wrote:
> Hi,
>
>> Birdtrack (‘>’ in front of a line) syntax takes everything verbatim so
>> it should do what you want. I'm not in an environment to test this at
>> the moment so let me know how it goes.
>
>
> From documentation (www.haskell.org/haddock/doc/html/ch03s08.html):
>
> 3.8.2. Special characters
>
> The following characters have special meanings in documentation
> comments: \, /, ', `, ", @, <. To insert a literal occurrence of one of
> these special characters, precede it with a backslash (\).
>
> Additionally, the character > has a special meaning at the beginning of
> a line, and the following characters have special meanings at the
> beginning of a paragraph: *, -. These characters can also be escaped
> using \.
>
> Furthermore, the character sequence >>> has a special meaning at the
> beginning of a line. To escape it, just prefix the characters in the
> sequence with a backslash.
>
I'm pretty well aware of the docs considering I now co-maintain Haddock ;)
> Updated test case: http://lpaste.net/103051
> Haddock error: http://lpaste.net/103052
Ok, firstly, code blocks are a paragraph-level entity: you'll need to
have an empty line before the code block (so just add an empty comment
line on line 2 of the comment. I forgot to mention this but I now see it.
If it still doesn't know let me know. Looking at that error, you're
probably using Haddock 2.13.x and what is most likely happening is that
it sees < and tries to parse a URL.
In Haddock 2.14.x (GHC 7.8.x required) this error would be gone (and the
fact that you need a newline would quickly become apparent).
If that *still* doesn't work, you can escape the ‘<’ with ‘\’. If that
STILL doesn't work, you can use HTML escape codes for ‘<’ but I very
highly doubt that it will come to this.
If you're still having issues after inserting a newline, I'll try and
set up an environment and see what I can do for you.
> Emanuel
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
--
Mateusz K.
More information about the Beginners
mailing list