@@ -427,13 +427,12 @@ createNsDoc :: IState -- ^ Needed to determine the types of names
427 -- documentation will be written.
427 -- documentation will be written.
429createNsDoc ist ns content out =
429createNsDoc ist ns content out =
430− do let tpath = out </> "docs" </> (genRelNsPath ns "html")
430+ do let tpath = out </> "docs" </> (genRelNsPath ns "html")
431− dir = takeDirectory tpath
431+ dir = takeDirectory tpath
432− file = takeFileName tpath
432+ file = takeFileName tpath
433− haveDocs (_, Just d, _) = [d]
433+ haveDocs (_, md, _) = md
435 -- We cannot do anything without a Doc
434 -- We cannot do anything without a Doc
436− content' = concatMap haveDocs (nsContents content)
435+ content' = reverse $ mapMaybe haveDocs $ nsContents content
437 createDirectoryIfMissing True dir
436 createDirectoryIfMissing True dir
438 (path, h) <- openTempFileWithDefaultPermissions dir file
437 (path, h) <- openTempFileWithDefaultPermissions dir file
439 BS2.hPut h $ renderHtml $ wrapper (Just ns) $ do
438 BS2.hPut h $ renderHtml $ wrapper (Just ns) $ do