Haddock eats the backslashes from the lambdas inside of @...@ code snippets. By switching to > prefixed code we can avoid this problem.
The switch to > prefixed code does come with a cost, though. It is not possible to add any additional markup as everything inside is interpreted verbatim. In particular, it is not possible to link to any identifiers from the code snippets. In practice, however, this only loses us one link to Either and one link to Left in the second example (which I don't think are that helpful to begin with, especially in this context).
I like this formatting better than the alternative of keeping the @ enclosed code snippets and doubling the backslashes in the source code because I think it keeps the source more readable but I'm open to change it.
Side-by-side comparison of previous and new rendering
Haddock eats the backslashes from the lambdas inside of
@...@
code snippets. By switching to>
prefixed code we can avoid this problem.The switch to
>
prefixed code does come with a cost, though. It is not possible to add any additional markup as everything inside is interpreted verbatim. In particular, it is not possible to link to any identifiers from the code snippets. In practice, however, this only loses us one link toEither
and one link toLeft
in the second example (which I don't think are that helpful to begin with, especially in this context).I like this formatting better than the alternative of keeping the
@
enclosed code snippets and doubling the backslashes in the source code because I think it keeps the source more readable but I'm open to change it.Side-by-side comparison of previous and new rendering