diff options
Diffstat (limited to 'dht/src/Data/Tox/Msg.hs')
-rw-r--r-- | dht/src/Data/Tox/Msg.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dht/src/Data/Tox/Msg.hs b/dht/src/Data/Tox/Msg.hs index 66ec6eb1..8819faa7 100644 --- a/dht/src/Data/Tox/Msg.hs +++ b/dht/src/Data/Tox/Msg.hs | |||
@@ -97,6 +97,7 @@ deriving instance (Show (Pkt a)) | |||
97 | 97 | ||
98 | type CryptoMessage = DSum Pkt Identity | 98 | type CryptoMessage = DSum Pkt Identity |
99 | 99 | ||
100 | msgID :: DSum Pkt Identity -> SomeMsg | ||
100 | msgID (Pkt mid :=> Identity _) = M mid | 101 | msgID (Pkt mid :=> Identity _) = M mid |
101 | 102 | ||
102 | -- TODO | 103 | -- TODO |
@@ -227,6 +228,7 @@ fromEnum8 = fromIntegral . fromEnum | |||
227 | 228 | ||
228 | data LossyOrLossless = Lossless | Lossy deriving (Eq,Ord,Enum,Show,Bounded) | 229 | data LossyOrLossless = Lossless | Lossy deriving (Eq,Ord,Enum,Show,Bounded) |
229 | 230 | ||
231 | someLossyness :: SomeMsg -> LossyOrLossless | ||
230 | someLossyness (M m) = lossyness m | 232 | someLossyness (M m) = lossyness m |
231 | 233 | ||
232 | lossyness :: KnownNat n => Msg n t -> LossyOrLossless | 234 | lossyness :: KnownNat n => Msg n t -> LossyOrLossless |