ls-usb 0.1.0.6 → 0.1.0.7
raw patch · 2 files changed
+13/−13 lines, 2 filesdep ~basedep ~usbdep ~usb-safe
Dependency ranges changed: base, usb, usb-safe
Files
- PrettyDevList.hs +9/−9
- ls-usb.cabal +4/−4
PrettyDevList.hs view
@@ -33,7 +33,7 @@ import Data.List ( intersperse, length, map, maximum , partition, transpose, zipWith )-import Data.Maybe ( maybe )+import Data.Maybe ( Maybe(Nothing, Just), maybe ) import Data.Word ( Word8, Word16 ) import Prelude ( (+), fromIntegral, fromInteger, fromRational ) import System.IO ( IO )@@ -58,7 +58,7 @@ , deviceProtocol, deviceReleaseNumber , deviceSerialNumberStrIx, deviceSubClass , deviceUSBSpecReleaseNumber, deviceVendorId- , BCD4+ , ReleaseNumber , ConfigDesc , configAttribs, configInterfaces , configMaxPower, configNumInterfaces@@ -210,12 +210,12 @@ unknown ∷ Doc unknown = text "unknown" -ppBCD4 ∷ BCD4 → Doc-ppBCD4 (a, b, c, d) = hcat ∘ punctuate (char '.') $ map pretty [a, b, c, d]+ppReleaseNumber ∷ ReleaseNumber → Doc+ppReleaseNumber (a, b, c, d) = hcat ∘ punctuate (char '.') $ map pretty [a, b, c, d] -ppStringDesc ∷ PPStyle → Device → StrIx → IO Doc-ppStringDesc _ _ 0 = return empty-ppStringDesc style dev ix = catchUSBException+ppStringDesc ∷ PPStyle → Device → Maybe StrIx → IO Doc+ppStringDesc _ _ Nothing = return empty+ppStringDesc style dev (Just ix) = catchUSBException ( withDevice dev $ \devH → fmap (descrStyle style) $ getStrDescFirstLang devH@@ -366,7 +366,7 @@ protocolDoc = ppDevProtocol style db classId subClassId protocolId return $ columns 2- [ field' "USB specification" [ versionStyle' ∘ ppBCD4+ [ field' "USB specification" [ versionStyle' ∘ ppReleaseNumber $ deviceUSBSpecReleaseNumber desc ] , field' "Class" [usbNumStyle' classId, classDoc]@@ -379,7 +379,7 @@ , field' "Product ID" [ usbNumStyle' $ text "0x" <> ppId productId , ppProductName style db vendorId productId id ]- , field' "Release number" [ versionStyle' ∘ ppBCD4+ , field' "Release number" [ versionStyle' ∘ ppReleaseNumber $ deviceReleaseNumber desc ] , field' "Manufacturer" [descrAddrStyle' manufacturerIx, manufacturerDoc]
ls-usb.cabal view
@@ -1,5 +1,5 @@ name: ls-usb-version: 0.1.0.6+version: 0.1.0.7 cabal-version: >= 1.6 build-type: Simple stability: beta@@ -19,12 +19,12 @@ executable ls-usb build-depends: ansi-wl-pprint >= 0.5.1 && < 0.6- , base >= 4.0 && < 4.3+ , base >= 4.0 && < 4.4 , base-unicode-symbols >= 0.1.1 && < 0.3 , bytestring >= 0.9.1 && < 0.10 , cmdargs == 0.3.*- , usb == 0.5.*- , usb-safe == 0.8.*+ , usb == 0.6.*+ , usb-safe == 0.11.* , usb-id-database >= 0.4.0.2 && < 0.5 ghc-options: -Wall -fno-warn-orphans main-is: ls-usb.hs