remove a couple shadow warnings

This commit is contained in:
Tony Hannan 2010-07-27 17:30:52 -04:00
parent 3a7f235246
commit 2568f9e530
2 changed files with 5 additions and 5 deletions

View file

@ -156,10 +156,10 @@ newConnection mos (ReplicaSet vHosts) = throwLeft . liftIO $ left (userError . s
Left (fs, is) -> if null is Left (fs, is) -> if null is
then return (Left fs) then return (Left fs)
else do else do
replicas <- sortedReplicas (head is) reps <- sortedReplicas (head is)
writeIORef vHosts replicas writeIORef vHosts reps
-- try again in case new replicas in info -- 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)) 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. -- ^ 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.

View file

@ -364,8 +364,8 @@ runQuery :: (DbConn m) => Bool -> [Notice] -> Query -> m CursorState'
-- ^ Send query request and return cursor state -- ^ Send query request and return cursor state
runQuery isExplain ns q = do runQuery isExplain ns q = do
db <- thisDatabase db <- thisDatabase
slaveOk <- context slaveOK <- context
call' ns (queryRequest isExplain slaveOk q db) call' ns (queryRequest isExplain slaveOK q db)
find :: (DbConn m) => Query -> m Cursor find :: (DbConn m) => Query -> m Cursor
-- ^ Fetch documents satisfying query -- ^ Fetch documents satisfying query