Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (28 sloc) 645 Bytes
{-# LANGUAGE CPP #-}
-- |
-- Module : Network.Socket.Wrapper
-- Copyright : 2013 Noriyuki OHKAWA
-- License : BSD3
--
-- Maintainer : n.ohkawa@gmail.com
-- Stability : experimental
-- Portability : unknown
--
-- This module wrap Network.Socket deprecated IF.
module Network.Socket.Wrapper
( close
, module Network.Socket
) where
import qualified Network.Socket as NS
#if MIN_VERSION_network(2,4,0)
import Network.Socket hiding ( close )
#else
import Network.Socket hiding ( sClose )
#endif
-- | wrap close/sClose
close :: Socket -> IO ()
#if MIN_VERSION_network(2,4,0)
close = NS.close
#else
close = NS.sClose
#endif