snmp 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+16/−2 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- snmp.cabal +2/−2
- src/Network/Protocol/Snmp.hs +14/−0
snmp.cabal view
@@ -1,5 +1,5 @@ name: snmp-version: 0.1.0.0+version: 0.1.0.1 synopsis: API for write snmp client. description: API for write snmp client. license: BSD3@@ -20,7 +20,7 @@ exposed-modules: Network.Protocol.Snmp, Network.Snmp.Client, Network.Snmp.Example other-modules: Network.Snmp.Client.Internal, Network.Snmp.Client.Types, Network.Snmp.Client.Version2, Network.Snmp.Client.Version3 -- other-extensions: - build-depends: base >=4.7 && <4.8, + build-depends: base >=4.6 && <4.8, asn1-encoding, asn1-types, asn1-parse,
src/Network/Protocol/Snmp.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE GADTs #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} module Network.Protocol.Snmp ( -- * snmp types@@ -113,7 +114,11 @@ import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Word (Word8, Word32, Word64)+#if MIN_VERSION_base(4,7,0) import Data.Bits (testBit, complement, shiftL, (.|.), (.&.), setBit, shiftR, zeroBits, xor, clearBit)+#else+import Data.Bits (testBit, complement, shiftL, (.|.), (.&.), setBit, shiftR, xor, clearBit, Bits(..))+#endif import Data.ASN1.Types (ASN1Object(..), ASN1(..), OID, ASN1ConstructionType(..), ASN1Class(..)) import Data.ASN1.Parse (getNext, getObject, runParseASN1, runParseASN1State, ParseASN1, getNextContainer, onNextContainer, getMany) import Data.ASN1.BinaryEncoding (DER(..))@@ -171,6 +176,15 @@ fI :: (Num b, Integral a) => a -> b fI = fromIntegral++#if MIN_VERSION_base(4,7,0)+#else+zeroBits :: (Num a, Bits a) => a+zeroBits = clearBit (bit 0) 0+ where+ bit :: (Bits a, Num a) => Int -> a+ bit i = 1 `shiftL` i+#endif -- | Phantom type for version 2 (Header V2, PDU V2) data V2