aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-04-01 20:48:42 +0000
committerDavid Waern <david.waern@gmail.com>2009-04-01 20:48:42 +0000
commit488fd5ef7762202b3c050442bc43fc32e02db046 (patch)
tree16da12dec857f36735f0e330e8572eb238394812
parent186015255cf4336047d8d32be94146f3fb57f631 (diff)
hlint police
-rw-r--r--src/Haddock/Interface/Create.hs5
-rw-r--r--src/Haddock/Interface/Rename.hs10
2 files changed, 7 insertions, 8 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 21304c4e..e5beffd1 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -239,9 +239,8 @@ warnAboutFilteredDecls mdl decls = do
let instances = nub [ pretty i | (L _ (InstD (InstDecl i _ _ ats)), _, _) <- decls
, not (null ats) ]
- when (not $ null instances) $
-
- tell $ nub $ [
+ unless (null instances) $
+ tell $ nub [
"Warning: " ++ modStr ++ ": We do not support associated types in instances yet. "
++ "These instances are affected:\n" ++ (concat $ intersperse ", " instances) ]
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 82b3b618..7a9a3292 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -65,7 +65,7 @@ renameInterface renamingEnv warnings iface =
unless (OptHide `elem` ifaceOptions iface || null strings || not warnings) $
tell ["Warning: " ++ moduleString (ifaceMod iface) ++
": could not find link destinations for:\n"++
- " " ++ concat (map (' ':) strings) ]
+ unwords (" " : strings) ]
return $ iface { ifaceRnDoc = finalModuleDoc,
ifaceRnDocMap = rnDocMap,
@@ -93,7 +93,7 @@ instance Monad (GenRnM n) where
return = returnRn
returnRn :: a -> GenRnM n a
-returnRn a = RnM (\_ -> (a,[]))
+returnRn a = RnM (const (a,[]))
thenRn :: GenRnM n a -> (a -> GenRnM n b) -> GenRnM n b
m `thenRn` k = RnM (\lkp -> case unRn m lkp of
(a,out1) -> case unRn (k a) lkp of
@@ -102,7 +102,7 @@ m `thenRn` k = RnM (\lkp -> case unRn m lkp of
getLookupRn :: RnM (Name -> (Bool, DocName))
getLookupRn = RnM (\lkp -> (lkp,[]))
outRn :: Name -> RnM ()
-outRn name = RnM (\_ -> ((),[name]))
+outRn name = RnM (const ((),[name]))
lookupRn :: (DocName -> a) -> Name -> RnM a
lookupRn and_then name = do
@@ -134,11 +134,11 @@ renameL = mapM rename
renameExportItems :: [ExportItem Name] -> RnM [ExportItem DocName]
-renameExportItems items = mapM renameExportItem items
+renameExportItems = mapM renameExportItem
renameMaybeDoc :: Maybe (HsDoc Name) -> RnM (Maybe (HsDoc DocName))
-renameMaybeDoc mbDoc = mapM renameDoc mbDoc
+renameMaybeDoc = mapM renameDoc
renameLDoc :: LHsDoc Name -> RnM (LHsDoc DocName)