Ticket #203 (new defect)
very difficult to list pragmas in haddock code blocks
| Reported by: | JeremyShaw | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Version: | 2.9.4 | Keywords: | |
| Cc: |
Description
I would like to embed this as a code block in haddock:
> {-# LANGUAGE QuasiQuotes #-}
> import Data.Char (toUpper)
> import HSX.QQ (hsx)
> import HSX.XMLGenerator
>
> html :: (XMLGenerator m) => XMLGenT m (XMLType m)
> html = [hsx| <p><% map toUpper "hello, world!" %></p> |]
But, the LANGUAGE pragma gets stripped out. I can do this inside the normal part of the haddock comment:
{-\# LANGUAGE QuasiQuotes? \#-}
And it renders as desired. However, if I put that inside the code block, it does not get stripped out, but it also does not get unescaped. So, it shows up exactly like that.
As far as I can tell, there is no way to actually show the pragma in the code block.
Change History
Note: See
TracTickets for help on using
tickets.
