Commits

Sergey Astanin committed 1488203

Fix shadowing and not-used warnings.

Comments (0)

Files changed (1)

lib/Network/Bitly.hs

 
 dropHeadIf :: (a -> Bool) -> [a] -> [a]
 dropHeadIf _ [] = []
-dropHeadIf p all@(x:xs)
+dropHeadIf p all'@(x:xs)
   | p x        = xs
-  | otherwise  = all
+  | otherwise  = all'
 
 -- | Internal function to accomodate all types of requests
 request :: Account    -- ^ Account to use
        in case (code',err',url') of
           (Just "OK", _, Just "") -> Left "Empty result"
           (Just "OK", _, Just url) -> Right url
-          (Just code, Just err, _) -> Left $ "Bit.ly error: " ++ err
+          (Just _, Just err, _) -> Left $ "Bit.ly error: " ++ err
           (Just code, Nothing, _) -> Left $ "Bit.ly error: statusCode = " ++ code
           (Nothing, _, _) -> Left $ "No statusCode in response"
 
   where
   query :: [String] -> Json -> Maybe String
-  query path json =
-     let search = foldr1 (>>>) . map getFromKey $ path
+  query path' json =
+     let search = foldr1 (>>>) . map getFromKey $ path'
      in  case (search json) of
          (JString str:_) -> Just str
          _               -> Nothing