Commit cd0359bc authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Add 'Protocol' datatype



Add 'Protocol' datatype which is necessary for the 'daemonsPorts'
constant.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 92b28956
......@@ -52,3 +52,14 @@ instance PyValue a => PyValue (FrozenSet a) where
mkSet :: Ord a => [a] -> FrozenSet a
mkSet = FrozenSet . Set.fromList
-- | 'Protocol' represents the protocols used by the daemons
data Protocol = Tcp | Udp
deriving (Show)
-- | 'PyValue' instance of 'Protocol'
--
-- This instance is used by the Haskell to Python constants
instance PyValue Protocol where
showValue Tcp = "\"tcp\""
showValue Udp = "\"udp\""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment