resolv :: Galaxy -> [Turf] -> IO (Maybe (Turf, Text, PortNumber, SockAddr))
resolv gal = go
 where
  go = \case
    []           -> pure Nothing
    turf : turfs -> do
      let host = galaxyHostname gal turf
          port = galaxyPort Real gal
      getAddrInfo Nothing (Just (unpack host)) (Just (show port)) >>= \case
        []     -> go turfs
        ip : _ -> pure $ Just (turf, host, port, addrAddress ip)
resolv :: Galaxy -> [Turf] -> IO (Maybe (Turf, Text, PortNumber, SockAddr))
resolv gal = go
 where
  go = \case
    []           -> pure Nothing
    turf : turfs -> do
      let host = galaxyHostname gal turf
          port = galaxyPort Real gal
      getAddrInfo Nothing (Just (unpack host)) (Just (show port)) >>= \case
        []     -> go turfs
        ip : _ -> pure $ Just (turf, host, port, addrAddress ip)
resolv gal = go
 where
  go = \case
    []           -> pure Nothing
    turf : turfs -> do
      let host = galaxyHostname gal turf
          port = galaxyPort Real gal
      getAddrInfo Nothing (Just (unpack host)) (Just (show port)) >>= \case
        []     -> go turfs
        ip : _ -> pure $ Just (turf, host, port, addrAddress ip)