Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Add NFData instance to EndPointAddress #8

Merged
merged 1 commit into from
Mar 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion network-transport.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Library
binary >= 0.5 && < 0.8,
bytestring >= 0.9 && < 0.11,
hashable >= 1.2.0.5 && < 1.3,
transformers >= 0.2 && < 0.5
transformers >= 0.2 && < 0.5,
deepseq >= 1.0 && < 1.5
if impl(ghc < 7.6)
Build-Depends: ghc-prim >= 0.2 && < 0.4
Exposed-Modules: Network.Transport,
Expand Down
3 changes: 3 additions & 0 deletions src/Network/Transport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Network.Transport
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS (copy)
import qualified Data.ByteString.Char8 as BSC (unpack)
import Control.DeepSeq (NFData(rnf))
import Control.Exception (Exception)
import Control.Applicative ((<$>))
import Data.Typeable (Typeable)
Expand Down Expand Up @@ -150,6 +151,8 @@ instance Binary EndPointAddress where
instance Show EndPointAddress where
show = BSC.unpack . endPointAddressToByteString

instance NFData EndPointAddress where rnf x = x `seq` ()

-- | EndPointAddress of a multicast group.
newtype MulticastAddress = MulticastAddress { multicastAddressToByteString :: ByteString }
deriving (Eq, Ord)
Expand Down