summaryrefslogtreecommitdiff
path: root/src/Data/BEncode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/BEncode.hs')
-rw-r--r--src/Data/BEncode.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Data/BEncode.hs b/src/Data/BEncode.hs
index aa34ab6..5d4e14d 100644
--- a/src/Data/BEncode.hs
+++ b/src/Data/BEncode.hs
@@ -70,6 +70,13 @@ instance BEncodable Int where
70 fromBEncode _ = Nothing 70 fromBEncode _ = Nothing
71 {-# INLINE fromBEncode #-} 71 {-# INLINE fromBEncode #-}
72 72
73instance BEncodable Bool where
74 toBEncode = toBEncode . fromEnum
75 {-# INLINE toBEncode #-}
76
77 fromBEncode b = toEnum <$> fromBEncode b
78 {-# INLINE fromBEncode #-}
79
73instance BEncodable Integer where 80instance BEncodable Integer where
74 toBEncode = BInteger . fromIntegral 81 toBEncode = BInteger . fromIntegral
75 {-# INLINE toBEncode #-} 82 {-# INLINE toBEncode #-}