Skip to content

Commit

Permalink
Merge PR haskell#349
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Sep 5, 2018
2 parents fc19752 + b595617 commit 2de1c12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Network/Socket/Types.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,8 @@ instance Storable PortNumber where
-- families. Currently only UNIX-domain sockets and the Internet
-- families are supported.

#if defined(IPV6_SOCKET_SUPPORT)
type FlowInfo = Word32
type ScopeID = Word32
#endif

-- | The existence of a constructor does not necessarily imply that
-- that socket address type is supported on your system: see
Expand Down Expand Up @@ -1025,13 +1023,13 @@ tupleToHostAddress (b3, b2, b1, b0) =
let x `sl` i = fromIntegral x `shiftL` i :: Word32
in ntohl $ (b3 `sl` 24) .|. (b2 `sl` 16) .|. (b1 `sl` 8) .|. (b0 `sl` 0)

#if defined(IPV6_SOCKET_SUPPORT)
-- | Independent of endianness. For example @::1@ is stored as @(0, 0, 0, 1)@.
--
-- For direct manipulation prefer 'hostAddress6ToTuple' and
-- 'tupleToHostAddress6'.
type HostAddress6 = (Word32, Word32, Word32, Word32)

#if defined(IPV6_SOCKET_SUPPORT)
hostAddress6ToTuple :: HostAddress6 -> (Word16, Word16, Word16, Word16,
Word16, Word16, Word16, Word16)
hostAddress6ToTuple (w3, w2, w1, w0) =
Expand Down

0 comments on commit 2de1c12

Please sign in to comment.