diff options
author | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2009-08-23 05:54:20 +0000 |
---|---|---|
committer | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2009-08-23 05:54:20 +0000 |
commit | 708bfb537b377129ea81025efbef3f6270fb827f (patch) | |
tree | 9235d394f4e1cb465d758618e4c765bb817e2754 /src/Haddock/Interface | |
parent | 180a63683c98598dee27ab7a2a93681b925cf50c (diff) |
fix horrible named-docs-disappearing bug :-)
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 41028100..29391702 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -347,12 +347,23 @@ collect d doc_so_far (e:es) = Just d0 -> finishedDoc d0 doc_so_far (collect (Just e) docStringEmpty es) +-- This used to delete all DocD:s, unless doc was DocEmpty, +-- which I suppose means you could kill a DocCommentNamed +-- by: +-- +-- > -- | killer +-- > +-- > -- $victim +-- +-- Anyway I accidentally deleted the DocEmpty condition without +-- realizing it was necessary for retaining some DocDs (at least +-- DocCommentNamed), so I'm going to try just not testing any conditions +-- and see if anything breaks. It really shouldn't break anything +-- to keep more doc decls around, IMHO. +-- +-- -Isaac finishedDoc :: Decl -> MaybeDocStringsFast -> [(Decl, MaybeDocStrings)] -> [(Decl, MaybeDocStrings)] -finishedDoc d doc rest | notDocDecl d = (d, docStringToList doc) : rest - where - notDocDecl (L _ (DocD _)) = False - notDocDecl _ = True -finishedDoc _ _ rest = rest +finishedDoc d doc rest = (d, docStringToList doc) : rest {- |