diff options
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/BitTorrent/Tracker/Message.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Tracker/Message.hs b/src/Network/BitTorrent/Tracker/Message.hs index e5d8b25a..3437dcf3 100644 --- a/src/Network/BitTorrent/Tracker/Message.hs +++ b/src/Network/BitTorrent/Tracker/Message.hs | |||
@@ -55,6 +55,7 @@ import Data.BEncode.BDict as BE | |||
55 | import Data.ByteString as BS | 55 | import Data.ByteString as BS |
56 | import Data.ByteString.Char8 as BC | 56 | import Data.ByteString.Char8 as BC |
57 | import Data.Char as Char | 57 | import Data.Char as Char |
58 | import Data.Convertible | ||
58 | import Data.List as L | 59 | import Data.List as L |
59 | import Data.Map as M | 60 | import Data.Map as M |
60 | import Data.Maybe | 61 | import Data.Maybe |
@@ -265,7 +266,7 @@ class FromParam a where | |||
265 | fromParam :: BS.ByteString -> Maybe a | 266 | fromParam :: BS.ByteString -> Maybe a |
266 | 267 | ||
267 | instance FromParam InfoHash where | 268 | instance FromParam InfoHash where |
268 | fromParam = byteStringToInfoHash | 269 | fromParam = either (const Nothing) pure . safeConvert |
269 | 270 | ||
270 | instance FromParam PeerId where | 271 | instance FromParam PeerId where |
271 | fromParam = byteStringToPeerId | 272 | fromParam = byteStringToPeerId |