summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-31 18:23:23 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-31 18:23:23 +0400
commitab80dc87b0d0440a8566e389f4f5f2d95d931a1a (patch)
tree10bd8c608bc790fbafcfb1270e8a00b805688557 /src/Network/BitTorrent
parentd52c84101661de38bd984de96d84e5a61f2ad9da (diff)
Add default instance for NodeAddr
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Core/Node.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Core/Node.hs b/src/Network/BitTorrent/Core/Node.hs
index 03f01ed0..da96ca43 100644
--- a/src/Network/BitTorrent/Core/Node.hs
+++ b/src/Network/BitTorrent/Core/Node.hs
@@ -122,6 +122,10 @@ data NodeAddr a = NodeAddr
122 122
123$(deriveJSON omitRecordPrefix ''NodeAddr) 123$(deriveJSON omitRecordPrefix ''NodeAddr)
124 124
125-- | @127.0.0.1:6882@
126instance Default (NodeAddr IPv4) where
127 def = "127.0.0.1:6882"
128
125-- | KRPC compatible encoding. 129-- | KRPC compatible encoding.
126instance Serialize a => Serialize (NodeAddr a) where 130instance Serialize a => Serialize (NodeAddr a) where
127 get = NodeAddr <$> get <*> get 131 get = NodeAddr <$> get <*> get