packages feed

usb 0.6.0.4 → 0.6.0.5

raw patch · 4 files changed

+27/−16 lines, 4 filesdep ~textPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: text

API changes (from Hackage documentation)

Files

System/USB/IO/StandardDeviceRequests.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax, DeriveDataTypeable #-}+{-# LANGUAGE CPP, NoImplicitPrelude, UnicodeSyntax, DeriveDataTypeable #-}  -------------------------------------------------------------------------------- -- |@@ -36,10 +36,14 @@ import Data.Functor            ( (<$>) ) import Data.Typeable           ( Typeable ) import Data.Word               ( Word8, Word16 )-import Prelude                 ( (+), fromInteger, fromIntegral, Enum )+import Prelude                 ( (+), fromIntegral, Enum ) import System.IO               ( IO ) import Text.Read               ( Read ) import Text.Show               ( Show )++#if __GLASGOW_HASKELL__ < 700+import Prelude                 ( fromInteger )+#endif  -- from base-unicode-symbols: import Data.Eq.Unicode         ( (≡) )
System/USB/Internal.hs view
@@ -8,7 +8,7 @@ --------------------------------------------------------------------------------  -- from base:-import Prelude               ( Num, (+), (-), (*), fromInteger+import Prelude               ( Num, (+), (-), (*)                              , Integral, fromIntegral, div                              , Enum, error                              )@@ -24,7 +24,7 @@ import Control.Exception     ( Exception, throwIO, bracket, bracket_                              , onException, assert                              )-import Control.Monad         ( Monad, return, (>>=), (>>), (=<<), fail, when, forM )+import Control.Monad         ( Monad, return, (>>=), (=<<), when, forM ) import Control.Arrow         ( (&&&) ) import Data.Function         ( ($), flip, on ) import Data.Functor          ( Functor, fmap, (<$>) )@@ -37,13 +37,18 @@ import Data.Char             ( String ) import Data.Eq               ( Eq, (==) ) import Data.Ord              ( Ord, (<), (>) )-import Data.Bool             ( Bool(False, True), not, otherwise )+import Data.Bool             ( Bool(False, True), not ) import Data.Bits             ( Bits, (.|.), setBit, testBit, shiftL ) import System.IO             ( IO ) import Text.Show             ( Show, show ) import Text.Read             ( Read ) import Text.Printf           ( printf ) +#if __GLASGOW_HASKELL__ < 700+import Prelude               ( fromInteger )+import Control.Monad         ( (>>), fail )+#endif+ -- from base-unicode-symbols: import Data.Function.Unicode ( (∘) ) import Data.Bool.Unicode     ( (∧) )@@ -953,8 +958,8 @@       [a, b, c, d] = map fromIntegral $ decodeBCD 4 abcd  unmarshalStrIx ∷ Word8 → Maybe StrIx-unmarshalStrIx strIx | strIx ≡ 0 = Nothing-                     | otherwise = Just strIx+unmarshalStrIx 0     = Nothing+unmarshalStrIx strIx = Just strIx  getConfigDesc ∷ Ptr C'libusb_device → Word8 → IO ConfigDesc getConfigDesc devPtr ix = bracket getConfigDescPtr
Utils.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax, BangPatterns #-}+{-# LANGUAGE CPP, NoImplicitPrelude, UnicodeSyntax, BangPatterns #-}  module Utils where @@ -9,10 +9,14 @@ -- from base: import Prelude               ( (+), (-), (^)                              , Enum, toEnum, fromEnum-                             , fromInteger                              , Integral, fromIntegral                              )-import Control.Monad         ( Monad, (>>=), (>>), fail, mapM )++#if __GLASGOW_HASKELL__ < 700+import Prelude               ( fromInteger )+#endif++import Control.Monad         ( Monad, (>>=), mapM ) import Foreign.Ptr           ( Ptr ) import Foreign.Storable      ( Storable,  ) import Foreign.Marshal.Array ( peekArray )@@ -61,10 +65,7 @@  -- | Monadic if...then...else... ifM ∷ Monad m ⇒ m Bool → m α → m α → m α-ifM cM tM eM = do c ← cM-                  if c-                    then tM-                    else eM+ifM cM tM eM = cM >>= \c → if c then tM else eM  {-| @decodeBCD bitsInDigit bcd@ decodes the Binary Coded Decimal @bcd@ to a list of its encoded digits. @bitsInDigit@, which is usually 4, is the number of bits
usb.cabal view
@@ -1,5 +1,5 @@ name:          usb-version:       0.6.0.4+version:       0.6.0.5 cabal-version: >=1.6 build-type:    Custom license:       BSD3@@ -59,11 +59,12 @@  Library   GHC-Options: -Wall+   build-depends: base                 >= 4     && < 4.4                , base-unicode-symbols >= 0.1.1 && < 0.3                , bindings-libusb      >= 1.3   && < 1.5                , bytestring           >= 0.9   && < 0.10-               , text                 >= 0.5   && < 0.11+               , text                 >= 0.5   && < 0.12   exposed-modules: System.USB                      System.USB.Initialization                      System.USB.Enumeration