4

I'm trying to document my sources and I have a problem with named chunk.

I would like to document a large amount of patterns (more than 50), I would like to keep each explanation near the code and gather all the explanations in the header

I tried the following :

module Haddock
  (
  -- A test for Haddock named chunk
  --
  -- $doc1
  --
  -- $doc2
  --
  -- $doc3
  )
  where

-- $doc1 
-- First serie of explanations
myFunction 0 = 1
myFunction 1 = 1

-- $doc2 
-- Second serie of explanations  
myFunction 2 = 3

-- $doc3 
-- Some examples
--
-- > myFunction a 
--
myFunction a = a * a 

but only the first chunk is shown :

enter image description here

Is there something wrong with my Haddock markup or is it a bug ?

JeanJouX
  • 2,555
  • 1
  • 25
  • 37
  • I wrote these Haddocks, which have multiple examples: https://github.com/yesodweb/yesod/blob/5e2fa9af821ab3eb1e26c2942897ebda496146af/yesod-form/Yesod/Form/Bootstrap3.hs#L8-L12 Maybe try deleting one of the `--` lines, or seeing if adding a title before the code sample fixes it? – MaxGabriel Nov 15 '15 at 21:18
  • 1
    Unrelated: The singular of "series" is still "series". – Ørjan Johansen Nov 16 '15 at 00:43

0 Answers0