Skip to content

Commit

Permalink
WIP: Drop possibly gratuitous Typeable instances
Browse files Browse the repository at this point in the history
Does anyone know why they are needed?
  • Loading branch information
hs-viktor committed May 23, 2020
1 parent 46d2996 commit 2ac0cc0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Network/Socket/Imports.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Network.Socket.Imports (
, module Data.Maybe
, module Data.Monoid
, module Data.Ord
, module Data.Typeable
, module Data.Word
, module Foreign.C.String
, module Foreign.C.Types
Expand All @@ -24,7 +23,6 @@ import Data.List
import Data.Maybe
import Data.Monoid
import Data.Ord
import Data.Typeable
import Data.Word
import Foreign.C.String
import Foreign.C.Types
Expand Down
7 changes: 3 additions & 4 deletions Network/Socket/Info.hsc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

Expand Down Expand Up @@ -63,7 +62,7 @@ data AddrInfoFlag =
-- addresses are found, IPv6-mapped IPv4 addresses will be
-- returned. (Only some platforms support this.)
| AI_V4MAPPED
deriving (Eq, Read, Show, Typeable)
deriving (Eq, Read, Show)

aiFlagMapping :: [(AddrInfoFlag, CInt)]

Expand Down Expand Up @@ -106,7 +105,7 @@ data AddrInfo = AddrInfo {
, addrProtocol :: ProtocolNumber
, addrAddress :: SockAddr
, addrCanonName :: Maybe String
} deriving (Eq, Show, Typeable)
} deriving (Eq, Show)

instance Storable AddrInfo where
sizeOf _ = #const sizeof(struct addrinfo)
Expand Down Expand Up @@ -170,7 +169,7 @@ data NameInfoFlag =
-- looked up. Instead, a numeric representation of the
-- service is returned.
| NI_NUMERICSERV
deriving (Eq, Read, Show, Typeable)
deriving (Eq, Read, Show)

niFlagMapping :: [(NameInfoFlag, CInt)]

Expand Down
1 change: 0 additions & 1 deletion Network/Socket/Options.hsc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
Expand Down
2 changes: 0 additions & 2 deletions Network/Socket/Shutdown.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}

#include "HsNetDef.h"

Expand Down Expand Up @@ -27,7 +26,6 @@ import Network.Socket.Types
data ShutdownCmd = ShutdownReceive
| ShutdownSend
| ShutdownBoth
deriving Typeable

sdownCmdToInt :: ShutdownCmd -> CInt
sdownCmdToInt ShutdownReceive = 0
Expand Down

0 comments on commit 2ac0cc0

Please sign in to comment.