diff options
author | David Waern <david.waern@gmail.com> | 2008-10-16 22:06:35 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-10-16 22:06:35 +0000 |
commit | 97fdcaec2088d1d5c8eb318e423e484336b2439c (patch) | |
tree | e4142eaa311ff31d105ec542350e1460fd28c526 /src/Haddock/Interface | |
parent | 6319cccbd95ba15db6f34101577034233cdc8f88 (diff) |
Document function and improve its layout
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 9d0995e6..23a3ee26 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -593,14 +593,13 @@ allSubsOfName modMap name | otherwise = error $ "Main.allSubsOfName: unexpected unqual'd name" --- Named documentation - +-- | Find a stand-alone documentation comment by its name findNamedDoc :: String -> [HsDecl Name] -> ErrMsgM (Maybe Doc) findNamedDoc name decls = search decls - where + where search [] = do - tell ["Cannot find documentation for: $" ++ name] - return Nothing + tell ["Cannot find documentation for: $" ++ name] + return Nothing search ((DocD (DocCommentNamed name' doc)):rest) | name == name' = return (Just doc) | otherwise = search rest |