openHandle :: String -> Int -> IO GHC.Handle
openHandle host port = H.hOpen (host, N.PortNumber (toEnum port)) `catch` wrapException
  where
    wrapException :: SomeException -> a
    wrapException e = error $ "Cannot connect to "++host++":"++(show port)++": "++(show e)
openHandle :: String -> Int -> IO GHC.Handle
openHandle host port = H.hOpen (host, N.PortNumber (toEnum port)) `catch` wrapException
  where
    wrapException :: SomeException -> a
    wrapException e = error $ "Cannot connect to "++host++":"++(show port)++": "++(show e)
openHandle host port = H.hOpen (host, N.PortNumber (toEnum port)) `catch` wrapException
  where
    wrapException :: SomeException -> a
    wrapException e = error $ "Cannot connect to "++host++":"++(show port)++": "++(show e)