From 97fdcaec2088d1d5c8eb318e423e484336b2439c Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 16 Oct 2008 22:06:35 +0000 Subject: Document function and improve its layout --- src/Haddock/Interface/Create.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3