Use same version check as in cabal file; fix typo in comment.

This commit is contained in:
Scott Fleischman 2019-05-30 10:28:23 -07:00
parent 17287b5556
commit 996d3e196b

View file

@ -4,7 +4,7 @@
module Database.MongoDB.Internal.Network (PortID(..), N.HostName, connectTo) where
#if !MIN_VERSION_network(2, 8, 0)
#if !MIN_VERSION_network(2, 9, 0)
import qualified Network as N
import System.IO (Handle)
@ -20,11 +20,11 @@ import System.IO (Handle, IOMode(ReadWriteMode))
-- | Wraps network's 'PortNumber'
-- Used to easy compatibility between older and newer network versions.
-- Used to ease compatibility between older and newer network versions.
newtype PortID = PortNumber N.PortNumber deriving (Show, Eq, Ord)
#if !MIN_VERSION_network(2, 8, 0)
#if !MIN_VERSION_network(2, 9, 0)
-- Unwrap our newtype and use network's PortID and connectTo
connectTo :: N.HostName -- Hostname