git.iko.soy/distributed-process
on master help sign in
Get rid of unused types/API
529930cTim Watson
distributed-process/src/Control/Distributed/Process/Internal/Types.hs−42
@@ -50,13 +50,8 @@ module Control.Distributed.Process.Internal.Types
50 , WhereIsReply(..)
50 , WhereIsReply(..)
51 , RegisterReply(..)
51 , RegisterReply(..)
52 , ProcessInfo(..)
52 , ProcessInfo(..)
53− , ProcessInfoKey
54 , ProcessInfoNone(..)
53 , ProcessInfoNone(..)
55− -- * Node controller entities required for primatives
56− , toMarshalledPInfoKey
57− , toPInfoKey
58 -- * Node controller internal data types
54 -- * Node controller internal data types
59− , SerializedProcessInfoKey
60 , NCMsg(..)
55 , NCMsg(..)
61 , ProcessSignal(..)
56 , ProcessSignal(..)
62 -- * Accessors
57 -- * Accessors
@@ -428,43 +423,6 @@ data WhereIsReply = WhereIsReply String (Maybe ProcessId)
428data RegisterReply = RegisterReply String Bool
423data RegisterReply = RegisterReply String Bool
429 deriving (Show, Typeable)
424 deriving (Show, Typeable)
430
425
431−data ProcessInfoKey =
432− ProcessInfoAll
433− | ProcessInfoNode
434− | ProcessInfoRegisteredNames
435− | ProcessInfoMessageQueueLength
436− | ProcessInfoMonitors
437− | ProcessInfoLinks
438− deriving (Show, Typeable, Eq)
439−
440−data SerializedProcessInfoKey = SerializedProcessInfoKey Int
441−
442−instance Binary SerializedProcessInfoKey where
443− put (SerializedProcessInfoKey n) = put n
444− get = SerializedProcessInfoKey <$> get
445−
446−-- | Convert 'ProcessInfoKey' to/from 'SerializedProcessInfoKey'
447−toMarshalledPInfoKey :: ProcessInfoKey -> SerializedProcessInfoKey
448−toMarshalledPInfoKey ProcessInfoAll = SerializedProcessInfoKey 1
449−toMarshalledPInfoKey ProcessInfoNode = SerializedProcessInfoKey 2
450−toMarshalledPInfoKey ProcessInfoRegisteredNames = SerializedProcessInfoKey 3
451−toMarshalledPInfoKey ProcessInfoMessageQueueLength = SerializedProcessInfoKey 4
452−toMarshalledPInfoKey ProcessInfoMonitors = SerializedProcessInfoKey 5
453−toMarshalledPInfoKey ProcessInfoLinks = SerializedProcessInfoKey 6
454−
455−-- | Convert 'SerializedProcessInfoKey' back into 'ProcessInfoKey'
456−toPInfoKey :: SerializedProcessInfoKey -> ProcessInfoKey
457−toPInfoKey (SerializedProcessInfoKey n)
458− | n == 1 = ProcessInfoAll
459− | n == 2 = ProcessInfoNode
460− | n == 3 = ProcessInfoRegisteredNames
461− | n == 4 = ProcessInfoMessageQueueLength
462− | n == 5 = ProcessInfoMonitors
463− | n == 6 = ProcessInfoLinks
464− -- using error is usually madness, but here represents either a silly mistake
465− -- or a deliberate attack, because only *we* actually construct these!
466− | otherwise = error "Illegal ProcessInfoKey Value"
467−
468data ProcessInfo = ProcessInfo {
426data ProcessInfo = ProcessInfo {
469 infoNode :: NodeId
427 infoNode :: NodeId
470 , infoRegisteredNames :: [String]
428 , infoRegisteredNames :: [String]