From 3db3cc9999f5714d500d949441ceb7e29d4eda32 Mon Sep 17 00:00:00 2001 From: Tony Hannan Date: Mon, 14 Mar 2011 16:28:09 -0400 Subject: [PATCH] fix minor compiler warnings --- Database/MongoDB/Connection.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/MongoDB/Connection.hs b/Database/MongoDB/Connection.hs index 7275932..6631f36 100644 --- a/Database/MongoDB/Connection.hs +++ b/Database/MongoDB/Connection.hs @@ -116,7 +116,7 @@ getReplicaInfo conn = do _ <- look "ismaster" info return $ ReplicaInfo (connHost conn) info -data ReplicaInfo = ReplicaInfo {infoHost :: Host, infoDoc :: Document} deriving (Show) +data ReplicaInfo = ReplicaInfo {_infoHost :: Host, infoDoc :: Document} deriving (Show) -- ^ Configuration info of a host in a replica set (result of /ismaster/ command). Contains all the hosts in the replica set plus its role in that set (master, slave, or arbiter) {- isPrimary :: ReplicaInfo -> Bool @@ -129,7 +129,7 @@ isSecondary = true1 "secondary" -} primary :: ReplicaInfo -> Maybe Host -- ^ Read primary from configuration info. During failover or minor network partition there is no primary (Nothing). -primary (ReplicaInfo host info) = if at "ismaster" info then Just host else readHostPort <$> lookup "primary" info +primary (ReplicaInfo host' info) = if at "ismaster" info then Just host' else readHostPort <$> lookup "primary" info replicas :: ReplicaInfo -> [Host] -- ^ All replicas in set according to this replica configuration info with primary at head, if there is one.