diff options
Diffstat (limited to 'ToxAddress.hs')
-rw-r--r-- | ToxAddress.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ToxAddress.hs b/ToxAddress.hs index f0d4aba3..ea69f6e3 100644 --- a/ToxAddress.hs +++ b/ToxAddress.hs | |||
@@ -13,7 +13,7 @@ | |||
13 | {-# LANGUAGE ScopedTypeVariables #-} | 13 | {-# LANGUAGE ScopedTypeVariables #-} |
14 | {-# LANGUAGE TupleSections #-} | 14 | {-# LANGUAGE TupleSections #-} |
15 | {-# LANGUAGE TypeApplications #-} | 15 | {-# LANGUAGE TypeApplications #-} |
16 | module ToxAddress (NodeInfo(..),NodeId(..),nodeInfo) where | 16 | module ToxAddress (NodeInfo(..),NodeId(..),nodeInfo,zeroID) where |
17 | 17 | ||
18 | import Control.Applicative | 18 | import Control.Applicative |
19 | import Control.Monad | 19 | import Control.Monad |
@@ -88,6 +88,9 @@ instance S.Serialize NodeId where | |||
88 | 88 | ||
89 | instance Bits NodeId where -- TODO | 89 | instance Bits NodeId where -- TODO |
90 | 90 | ||
91 | instance Hashable NodeId where | ||
92 | hashWithSalt salt (NodeId key) = hashWithSalt salt (BA.convert key :: ByteString) | ||
93 | |||
91 | instance FiniteBits NodeId where | 94 | instance FiniteBits NodeId where |
92 | finiteBitSize _ = 256 | 95 | finiteBitSize _ = 256 |
93 | 96 | ||