projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
91c489b
)
Fix warnings in HaddockUtils
author
Ian Lynagh
<igloo@earth.li>
Mon, 29 Dec 2008 19:16:57 +0000
(19:16 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Mon, 29 Dec 2008 19:16:57 +0000
(19:16 +0000)
compiler/parser/HaddockUtils.hs
patch
|
blob
|
history
diff --git
a/compiler/parser/HaddockUtils.hs
b/compiler/parser/HaddockUtils.hs
index
0275e79
..
70375d7
100644
(file)
--- a/
compiler/parser/HaddockUtils.hs
+++ b/
compiler/parser/HaddockUtils.hs
@@
-1,9
+1,3
@@
-{-# OPTIONS -w #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and fix
--- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
--- for details
module HaddockUtils where
module HaddockUtils where
@@
-33,11
+27,11
@@
parseModuleHeader str0 =
Nothing -> (Nothing,str)
Just (value,rest) -> (Just value,rest)
Nothing -> (Nothing,str)
Just (value,rest) -> (Just value,rest)
- (moduleOpt,str1) = getKey "Module" str0
+ (_moduleOpt,str1) = getKey "Module" str0
(descriptionOpt,str2) = getKey "Description" str1
(descriptionOpt,str2) = getKey "Description" str1
- (copyrightOpt,str3) = getKey "Copyright" str2
- (licenseOpt,str4) = getKey "License" str3
- (licenceOpt,str5) = getKey "Licence" str4
+ (_copyrightOpt,str3) = getKey "Copyright" str2
+ (_licenseOpt,str4) = getKey "License" str3
+ (_licenceOpt,str5) = getKey "Licence" str4
(maintainerOpt,str6) = getKey "Maintainer" str5
(stabilityOpt,str7) = getKey "Stability" str6
(portabilityOpt,str8) = getKey "Portability" str7
(maintainerOpt,str6) = getKey "Maintainer" str5
(stabilityOpt,str7) = getKey "Stability" str6
(portabilityOpt,str8) = getKey "Portability" str7
@@
-97,7
+91,7
@@
parseKey key toParse0 =
return (scanKey True indentation afterColon1)
where
scanKey :: Bool -> String -> String -> (String,String)
return (scanKey True indentation afterColon1)
where
scanKey :: Bool -> String -> String -> (String,String)
- scanKey isFirst indentation [] = ([],[])
+ scanKey _ _ [] = ([],[])
scanKey isFirst indentation str =
let
(nextLine,rest1) = extractNextLine str
scanKey isFirst indentation str =
let
(nextLine,rest1) = extractNextLine str
@@
-149,7
+143,7
@@
parseKey key toParse0 =
-- comparison is case-insensitive.
extractPrefix :: String -> String -> Maybe String
extractPrefix [] s = Just s
-- comparison is case-insensitive.
extractPrefix :: String -> String -> Maybe String
extractPrefix [] s = Just s
- extractPrefix s [] = Nothing
+ extractPrefix _ [] = Nothing
extractPrefix (c1:cs1) (c2:cs2)
| toUpper c1 == toUpper c2 = extractPrefix cs1 cs2
| True = Nothing
extractPrefix (c1:cs1) (c2:cs2)
| toUpper c1 == toUpper c2 = extractPrefix cs1 cs2
| True = Nothing