[Haddock] [haddock] #203: very difficult to list pragmas in haddock code blocks

haddock haddock at projects.haskell.org
Sat Apr 28 00:45:42 BST 2012


#203: very difficult to list pragmas in haddock code blocks
-----------------------+----------------------------------------------------
Reporter:  JeremyShaw  |       Owner:        
    Type:  defect      |      Status:  new   
Priority:  minor       |   Milestone:  2.10.0
 Version:  2.9.4       |    Keywords:        
-----------------------+----------------------------------------------------
 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:

     {&#45;\# LANGUAGE QuasiQuotes \#&#45;}

 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.

-- 
Ticket URL: <http://trac.haskell.org/haddock/ticket/203>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool


More information about the Haddock mailing list