Skip to content

Commit

Permalink
exporting packFamily and unpackFamily again. (haskell#324).
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed May 29, 2018
1 parent 819d35b commit 5dcc479
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Network/Socket.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ module Network.Socket
-- ** Family
, Family(..)
, isSupportedFamily
, packFamily
, unpackFamily
-- ** Protocol number
, ProtocolNumber
, defaultProtocol
Expand Down
2 changes: 2 additions & 0 deletions Network/Socket/Types.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ data Family
| AF_CAN -- ^ Controller Area Network
deriving (Eq, Ord, Read, Show)

-- | Converting 'Family' to 'CInt'.
packFamily :: Family -> CInt
packFamily f = case packFamily' f of
Just fam -> fam
Expand Down Expand Up @@ -531,6 +532,7 @@ packFamily' f = case Just f of

--------- ----------

-- | Converting 'CInt' to 'Family'.
unpackFamily :: CInt -> Family
unpackFamily f = case f of
(#const AF_UNSPEC) -> AF_UNSPEC
Expand Down

0 comments on commit 5dcc479

Please sign in to comment.