[commit: haddock] ghc-7.8: Don't shadow ‘strip’. (5e852cc)

git at git.haskell.org git at git.haskell.org
Mon Feb 24 21:36:27 UTC 2014


Repository : ssh://git@git.haskell.org/haddock

On branch  : ghc-7.8
Link       : http://git.haskell.org/haddock.git/commitdiff/5e852cc642e761b3191be5a5ca2b2e792a02d560

>---------------------------------------------------------------

commit 5e852cc642e761b3191be5a5ca2b2e792a02d560
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date:   Sun Feb 23 05:02:47 2014 +0000

    Don't shadow ‘strip’.
    
    -Wall complains
    
    (cherry picked from commit 1944b94edca881d14e979d564719da6f196f8e63)


>---------------------------------------------------------------

5e852cc642e761b3191be5a5ca2b2e792a02d560
 src/Haddock/Parser.hs |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Haddock/Parser.hs b/src/Haddock/Parser.hs
index 095f385..cd7bb02 100644
--- a/src/Haddock/Parser.hs
+++ b/src/Haddock/Parser.hs
@@ -307,11 +307,11 @@ birdtracks = DocCodeBlock . DocString . intercalate "\n" . stripSpace <$> many1
     line = skipHorizontalSpace *> ">" *> takeLine
 
 stripSpace :: [String] -> [String]
-stripSpace = fromMaybe <*> mapM strip
+stripSpace = fromMaybe <*> mapM strip'
   where
-    strip (' ':xs) = Just xs
-    strip "" = Just ""
-    strip _  = Nothing
+    strip' (' ':xs') = Just xs'
+    strip' "" = Just ""
+    strip' _  = Nothing
 
 -- | Parses examples. Examples are a paragraph level entitity (separated by an empty line).
 -- Consecutive examples are accepted.



More information about the ghc-commits mailing list