aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-11-14 12:10:47 +0000
committerDavid Waern <david.waern@gmail.com>2009-11-14 12:10:47 +0000
commitd3dcfadaa31815dc6ad1d45adf67d2386e33091c (patch)
tree45e2ad34e0fec7757954509ab6c81ecb4cb78edc /src/Haddock/Interface
parente7be4057a769c79969f762e83c6fc8c751ad6533 (diff)
hlint police
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Create.hs14
-rw-r--r--src/Haddock/Interface/ExtractFnArgDocs.hs1
-rw-r--r--src/Haddock/Interface/LexParseRn.hs3
3 files changed, 8 insertions, 10 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 298f96ac..7a1d6d25 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -280,7 +280,7 @@ warnAboutFilteredDecls mdl decls = do
tell $ nub [
"Warning: " ++ modStr ++ ": Instances of type and data "
++ "families are not yet supported. Instances of the following families "
- ++ "will be filtered out:\n " ++ (concat $ intersperse ", "
+ ++ "will be filtered out:\n " ++ concat (intersperse ", "
$ map (occNameString . nameOccName) typeInstances) ]
let instances = nub [ pretty i | (L _ (InstD (InstDecl i _ _ ats)), _, _) <- decls
@@ -289,7 +289,7 @@ warnAboutFilteredDecls mdl decls = do
unless (null instances) $
tell $ nub [
"Warning: " ++ modStr ++ ": We do not support associated types in instances yet. "
- ++ "These instances are affected:\n" ++ (concat $ intersperse ", " instances) ]
+ ++ "These instances are affected:\n" ++ concat (intersperse ", " instances) ]
--------------------------------------------------------------------------------
@@ -446,13 +446,13 @@ mkExportItems modMap this_mod gre exported_names decls declMap
lookupExport (IEThingAll t) = declWith t
lookupExport (IEThingWith t _) = declWith t
lookupExport (IEModuleContents m) = fullContentsOf m
- lookupExport (IEGroup lev docStr) = liftErrMsg $ do
+ lookupExport (IEGroup lev docStr) = liftErrMsg $
ifDoc (lexParseRnHaddockComment DocSectionComment gre docStr)
(\doc -> return [ ExportGroup lev "" doc ])
- lookupExport (IEDoc docStr) = liftErrMsg $ do
+ lookupExport (IEDoc docStr) = liftErrMsg $
ifDoc (lexParseRnHaddockComment NormalHaddockComment gre docStr)
(\doc -> return [ ExportDoc doc ])
- lookupExport (IEDocNamed str) = liftErrMsg $ do
+ lookupExport (IEDocNamed str) = liftErrMsg $
ifDoc (findNamedDoc str [ unL d | (d,_,_) <- decls ])
(\docStr ->
ifDoc (lexParseRnHaddockComment NormalHaddockComment gre docStr)
@@ -606,7 +606,7 @@ mkExportItems modMap this_mod gre exported_names decls declMap
subs' = filter ((`elem` exported_names) . fst) subs
sub_names = map fst subs'
- isExported n = n `elem` exported_names
+ isExported = (`elem` exported_names)
fullContentsOf modname
| m == this_mod = liftErrMsg $ fullContentsOfThisModule gre decls
@@ -663,7 +663,7 @@ fullContentsOfThisModule gre decls = liftM catMaybes $ mapM mkExportItem decls
where
mkExportItem (L _ (DocD (DocGroup lev docStr)), _, _) = do
mbDoc <- lexParseRnHaddockComment DocSectionComment gre docStr
- return $ fmap (\doc -> ExportGroup lev "" doc) mbDoc
+ return $ fmap (ExportGroup lev "") mbDoc
mkExportItem (L _ (DocD (DocCommentNamed _ docStr)), _, _) = do
mbDoc <- lexParseRnHaddockComment NormalHaddockComment gre docStr
return $ fmap ExportDoc mbDoc
diff --git a/src/Haddock/Interface/ExtractFnArgDocs.hs b/src/Haddock/Interface/ExtractFnArgDocs.hs
index 0a6a05de..d3d7160f 100644
--- a/src/Haddock/Interface/ExtractFnArgDocs.hs
+++ b/src/Haddock/Interface/ExtractFnArgDocs.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Interface.ExtractFnArgDocs
diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs
index 04464e77..026e753c 100644
--- a/src/Haddock/Interface/LexParseRn.hs
+++ b/src/Haddock/Interface/LexParseRn.hs
@@ -58,8 +58,7 @@ lexParseRnHaddockComment hty gre (HsDocString fs) = do
Nothing -> do
tell ["doc comment parse failed: "++str]
return Nothing
- Just doc -> do
- return (Just (rnHsDoc gre doc))
+ Just doc -> return (Just (rnHsDoc gre doc))
#else
lexParseRnHaddockComment _ _ doc = return (Just doc)
#endif