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