From ab80dc87b0d0440a8566e389f4f5f2d95d931a1a Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 31 Dec 2013 18:23:23 +0400 Subject: Add default instance for NodeAddr --- src/Network/BitTorrent/Core/Node.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 $(deriveJSON omitRecordPrefix ''NodeAddr) +-- | @127.0.0.1:6882@ +instance Default (NodeAddr IPv4) where + def = "127.0.0.1:6882" + -- | KRPC compatible encoding. instance Serialize a => Serialize (NodeAddr a) where get = NodeAddr <$> get <*> get -- cgit v1.2.3