Skip to content

Commit

Permalink
deprecating internal functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Feb 28, 2018
1 parent 6f64d3e commit 2156c61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Network/BSD.hsc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
{-# OPTIONS_HADDOCK hide #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.BSD
Expand Down
2 changes: 1 addition & 1 deletion Network/Socket.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module Network.Socket
#ifdef SCM_RIGHTS
, sCM_RIGHTS
#endif
-- * Internal - don't use this
-- ** Decrecated internal functions
, packFamily
, unpackFamily
, packSocketType
Expand Down
6 changes: 6 additions & 0 deletions Network/Socket/Types.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ packSocketType' stype = case Just stype of
#endif
_ -> Nothing

{-# DEPRECATED packSocketType "Don't use this" #-}

packSocketType :: SocketType -> CInt
packSocketType stype = fromMaybe (error errMsg) (packSocketType' stype)
where
Expand Down Expand Up @@ -312,6 +314,8 @@ data Family
| AF_CAN -- Controller Area Network
deriving (Eq, Ord, Read, Show)

{-# DEPRECATED packFamily "Don't use this" #-}

packFamily :: Family -> CInt
packFamily f = case packFamily' f of
Just fam -> fam
Expand Down Expand Up @@ -528,6 +532,8 @@ packFamily' f = case Just f of

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

{-# DEPRECATED unpackFamily "Don't use this" #-}

unpackFamily :: CInt -> Family
unpackFamily f = case f of
(#const AF_UNSPEC) -> AF_UNSPEC
Expand Down

0 comments on commit 2156c61

Please sign in to comment.