From 2568f9e530f6318ef36d425c744c5c8302632253 Mon Sep 17 00:00:00 2001 From: Tony Hannan Date: Tue, 27 Jul 2010 17:30:52 -0400 Subject: [PATCH] remove a couple shadow warnings --- Database/MongoDB/Connection.hs | 6 +++--- Database/MongoDB/Query.hs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Database/MongoDB/Connection.hs b/Database/MongoDB/Connection.hs index b42bfd8..144064b 100644 --- a/Database/MongoDB/Connection.hs +++ b/Database/MongoDB/Connection.hs @@ -156,10 +156,10 @@ newConnection mos (ReplicaSet vHosts) = throwLeft . liftIO $ left (userError . s Left (fs, is) -> if null is then return (Left fs) else do - replicas <- sortedReplicas (head is) - writeIORef vHosts replicas + reps <- sortedReplicas (head is) + writeIORef vHosts reps -- try again in case new replicas in info - (fst +++ fst) <$> connectFirst mos replicas + (fst +++ fst) <$> connectFirst mos reps connectFirst :: MasterOrSlaveOk -> [Host] -> IO (Either ([(Host, IOError)], [ReplicaInfo]) (Connection, ReplicaInfo)) -- ^ Connect to first host that succeeds and is master/slave, otherwise return list of failed connections plus info of connections that succeeded but were not master/slave. diff --git a/Database/MongoDB/Query.hs b/Database/MongoDB/Query.hs index 8043efd..4c1f656 100644 --- a/Database/MongoDB/Query.hs +++ b/Database/MongoDB/Query.hs @@ -364,8 +364,8 @@ runQuery :: (DbConn m) => Bool -> [Notice] -> Query -> m CursorState' -- ^ Send query request and return cursor state runQuery isExplain ns q = do db <- thisDatabase - slaveOk <- context - call' ns (queryRequest isExplain slaveOk q db) + slaveOK <- context + call' ns (queryRequest isExplain slaveOK q db) find :: (DbConn m) => Query -> m Cursor -- ^ Fetch documents satisfying query