summaryrefslogtreecommitdiff
path: root/Hosts.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hosts.hs')
-rw-r--r--Hosts.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Hosts.hs b/Hosts.hs
index e53d441..0761597 100644
--- a/Hosts.hs
+++ b/Hosts.hs
@@ -1,5 +1,9 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE ScopedTypeVariables #-} 2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE OverloadedStrings #-} 3{-# LANGUAGE OverloadedStrings #-}
4#if ! MIN_VERSION_network(2,4,0)
5{-# LANGUAGE StandaloneDeriving #-}
6#endif
3module Hosts 7module Hosts
4 ( Hosts 8 ( Hosts
5 , assignName 9 , assignName
@@ -31,6 +35,10 @@ import Control.Applicative ( (<$>), (<*>) )
31import Control.Monad (mplus) 35import Control.Monad (mplus)
32import Network.Socket 36import Network.Socket
33 37
38#if ! MIN_VERSION_network(2,4,0)
39deriving instance Ord SockAddr
40#endif
41
34handleIO_ h a = Exception.catch a (\(_ :: IOException) -> h) 42handleIO_ h a = Exception.catch a (\(_ :: IOException) -> h)
35 43
36inet_pton :: String -> Maybe SockAddr 44inet_pton :: String -> Maybe SockAddr