ls-usb 0.1.0.10 → 0.1.0.11
raw patch · 4 files changed
+94/−156 lines, 4 filesdep ~basedep ~cmdargsdep ~usb
Dependency ranges changed: base, cmdargs, usb
Files
- LICENSE +1/−1
- PrettyDevList.hs +51/−98
- ls-usb.cabal +5/−5
- ls-usb.hs +37/−52
LICENSE view
@@ -1,4 +1,4 @@-Copyright 2009–2011 Roel van Dijk+Copyright 2009–2012 Roel van Dijk All rights reserved.
PrettyDevList.hs view
@@ -1,15 +1,15 @@-{-# LANGUAGE CPP- , NoImplicitPrelude- , RankNTypes- , ScopedTypeVariables- , UnicodeSyntax- #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE PackageImports #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE UnicodeSyntax #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module : PrettyDevList-Copyright : 2009–2011 Roel van Dijk+Copyright : 2009–2012 Roel van Dijk License : BSD3 (see the file LICENSE) Maintainer : Roel van Dijk <vandijk.roel@gmail.com> -}@@ -24,100 +24,53 @@ -- Imports -------------------------------------------------------------------------------- --- from ansi-wl-pprint:-import Text.PrettyPrint.ANSI.Leijen ( Doc, Pretty, SimpleDoc(..)- , (<+>), (<$>), (<>)- , align, char, dquotes, empty, fill, hcat- , hsep, indent, int, pretty, punctuate- , renderPretty, text, vcat- , bold, cyan, dullred, green, magenta- , oncyan, ongreen, onmagenta, onyellow, red- , underline, white, yellow- )---- from base:-import Control.Exception ( catch )-import Control.Monad ( liftM, mapM, return )-import Data.Bool ( Bool(False, True) )-import Data.Char ( toLower )-import Data.Function ( ($), id )-import Data.Functor ( fmap )-import Data.Int ( Int )-import Data.List ( intersperse, length, map, maximum- , partition, transpose, zipWith- )-import Data.Maybe ( Maybe(Nothing, Just), maybe )-import Data.Word ( Word8, Word16 )-import Prelude ( String, (+), fromIntegral )-import System.IO ( IO )-import Text.Printf ( PrintfArg, printf )-import Text.Show ( Show, show )+import "ansi-wl-pprint" Text.PrettyPrint.ANSI.Leijen+ ( Doc, Pretty, SimpleDoc(..)+ , (<+>), (<$>), (<>)+ , align, char, dquotes, empty, fill, hcat+ , hsep, indent, int, pretty, punctuate+ , renderPretty, text, vcat+ , bold, cyan, dullred, green, magenta+ , oncyan, ongreen, onmagenta, onyellow, red+ , underline, white, yellow+ )+import "base" Control.Exception ( catch )+import "base" Control.Monad ( liftM, mapM, return )+import "base" Data.Bool ( Bool(False, True) )+import "base" Data.Char ( toLower )+import "base" Data.Function ( ($), id )+import "base" Data.Functor ( fmap )+import "base" Data.Int ( Int )+import "base" Data.List+ ( intersperse, length, map, maximum, partition, transpose, zipWith )+import "base" Data.Maybe ( Maybe(Nothing, Just), maybe )+import "base" Data.Word ( Word8, Word16 )+import "base" Prelude ( String, (+), fromIntegral )+import "base" System.IO ( IO )+import "base" Text.Printf ( PrintfArg, printf )+import "base" Text.Show ( Show, show ) #if __GLASGOW_HASKELL__ < 700-import Control.Monad ( (>>=), fail )-import Data.Eq ( (==) )-import Prelude ( fromInteger, fromRational )+import "base" Control.Monad ( (>>=), fail )+import "base" Data.Eq ( (==) )+import "base" Prelude ( fromInteger, fromRational ) #endif---- from base-unicode-symbols:-import Control.Arrow.Unicode ( (⋙) )-import Data.Function.Unicode ( (∘) )-import Data.Eq.Unicode ( (≡) )-import Prelude.Unicode ( (⋅) )---- from text:-import qualified Data.Text as T ( Text, unpack )---- from usb:-import System.USB.Descriptors ( getLanguages- , getStrDescFirstLang- , DeviceDesc- , deviceClass, deviceConfigs- , deviceManufacturerStrIx- , deviceMaxPacketSize0, deviceNumConfigs- , deviceProductId, deviceProductStrIx- , deviceProtocol, deviceReleaseNumber- , deviceSerialNumberStrIx, deviceSubClass- , deviceUSBSpecReleaseNumber, deviceVendorId- , ReleaseNumber- , ConfigDesc- , configAttribs, configInterfaces- , configMaxPower, configNumInterfaces- , configStrIx, configValue- , DeviceStatus- , remoteWakeup, selfPowered- , InterfaceDesc- , interfaceAltSetting, interfaceClass- , interfaceEndpoints, interfaceNumber- , interfaceProtocol, interfaceStrIx- , interfaceSubClass- , EndpointDesc- , endpointAddress, endpointAttribs- , endpointInterval, endpointMaxPacketSize- , endpointRefresh, endpointSynchAddress- , EndpointAddress- , endpointNumber, transferDirection- , TransferDirection(In, Out)- , TransferType(Isochronous)- , Synchronization(NoSynchronization)- , Usage- , MaxPacketSize- , maxPacketSize, transactionOpportunities- , TransactionOpportunities(Zero, One, Two)- , LangId, StrIx- )-import System.USB.DeviceHandling ( withDeviceHandle )-import System.USB.Enumeration ( Device- , deviceDesc, busNumber, deviceAddress- )-import System.USB.Exceptions ( USBException )---- from usb-id-database:-import System.USB.IDDB ( IDDB- , vendorName, productName- , className, subClassName, protocolName- , langName, subLangName- )+import "base-unicode-symbols" Control.Arrow.Unicode ( (⋙) )+import "base-unicode-symbols" Data.Function.Unicode ( (∘) )+import "base-unicode-symbols" Data.Eq.Unicode ( (≡) )+import "base-unicode-symbols" Prelude.Unicode ( (⋅) )+import qualified "text" Data.Text as T ( Text, unpack )+import "usb" System.USB.Descriptors+import "usb" System.USB.DeviceHandling ( withDeviceHandle )+import "usb" System.USB.Enumeration+ ( Device, deviceDesc, busNumber, deviceAddress )+import "usb" System.USB.Exceptions ( USBException )+import "usb-id-database" System.USB.IDDB+ ( IDDB+ , vendorName, productName+ , className, subClassName, protocolName+ , langName, subLangName+ ) --------------------------------------------------------------------------------
ls-usb.cabal view
@@ -1,11 +1,11 @@ name: ls-usb-version: 0.1.0.10+version: 0.1.0.11 cabal-version: >= 1.6 build-type: Simple stability: beta author: Roel van Dijk <vandijk.roel@gmail.com> maintainer: Roel van Dijk <vandijk.roel@gmail.com>-copyright: 2009–2011 Roel van Dijk <vandijk.roel@gmail.com>+copyright: 2009–2012 Roel van Dijk <vandijk.roel@gmail.com> license: BSD3 license-file: LICENSE homepage: https://github.com/roelvandijk/ls-usb@@ -22,11 +22,11 @@ executable ls-usb build-depends: ansi-wl-pprint >= 0.5.1 && < 0.7- , base >= 4.0 && < 4.5+ , base >= 4.0 && < 4.6 , base-unicode-symbols >= 0.1.1 && < 0.3 , text >= 0.1 && < 0.12- , cmdargs >= 0.3 && < 0.9- , usb >= 1.0 && < 1.1+ , cmdargs >= 0.3 && < 0.10+ , usb >= 1.0 && < 1.2 , usb-id-database >= 0.4.0.2 && < 0.5 ghc-options: -Wall main-is: ls-usb.hs
ls-usb.hs view
@@ -1,8 +1,12 @@-{-# LANGUAGE CPP, DeriveDataTypeable, NoImplicitPrelude, UnicodeSyntax #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE PackageImports #-}+{-# LANGUAGE UnicodeSyntax #-} {-| Module : Main-Copyright : 2009–2011 Roel van Dijk+Copyright : 2009–2012 Roel van Dijk License : BSD3 (see the file LICENSE) Maintainer : Roel van Dijk <vandijk.roel@gmail.com> -}@@ -13,58 +17,39 @@ -- Imports -------------------------------------------------------------------------------- --- from ansi-wl-pprint:-import Text.PrettyPrint.ANSI.Leijen ( putDoc, plain )---- from base:-import Control.Monad ( (=<<) )-import Data.Bool ( Bool(False, True), otherwise )-import Data.Data ( Data )-import Data.Function ( ($), const, id )-import Data.Int ( Int )-import Data.List ( (++), filter, foldr, map )-import Data.Typeable ( Typeable )-import Data.Word ( Word8 )-import Data.Version ( showVersion )-import Prelude ( fromIntegral )-import System.IO ( IO, putStrLn )-import Text.Show ( Show )-+import "ansi-wl-pprint" Text.PrettyPrint.ANSI.Leijen ( putDoc, plain )+import "base" Control.Monad ( (=<<) )+import "base" Data.Bool ( Bool(False, True), otherwise )+import "base" Data.Data ( Data )+import "base" Data.Function ( ($), const, id )+import "base" Data.Int ( Int )+import "base" Data.List ( (++), filter, foldr, map )+import "base" Data.Typeable ( Typeable )+import "base" Data.Word ( Word8 )+import "base" Data.Version ( showVersion )+import "base" Prelude ( fromIntegral )+import "base" System.IO ( IO, putStrLn )+import "base" Text.Show ( Show ) #if __GLASGOW_HASKELL__ < 700-import Control.Monad ( (>>=), (>>), fail )+import "base" Control.Monad ( (>>=), (>>), fail ) #endif---- from base-unicode-symbols:-import Data.Function.Unicode ( (∘) )-import Data.Bool.Unicode ( (∧), (∨) )-import Data.Eq.Unicode ( (≡) )---- from cmdargs:-import System.Console.CmdArgs.Implicit ( (&=)- , cmdArgs, def, details, explicit, help- , isLoud, name, summary, typ, verbosity- )---- from ls-usb (this package):-import PrettyDevList ( ppDevices- , brightStyle, darkStyle- )-import Paths_ls_usb ( version )---- from usb:-import System.USB.Initialization ( Verbosity(PrintNothing)- , newCtx, setDebug- )-import System.USB.Enumeration ( Device- , getDevices, deviceDesc- , busNumber, deviceAddress- )-import System.USB.Descriptors ( VendorId, ProductId- , deviceVendorId, deviceProductId- )---- from usb-id-database:-import System.USB.IDDB.LinuxUsbIdRepo ( staticDb )+import "base-unicode-symbols" Data.Function.Unicode ( (∘) )+import "base-unicode-symbols" Data.Bool.Unicode ( (∧), (∨) )+import "base-unicode-symbols" Data.Eq.Unicode ( (≡) )+import "cmdargs" System.Console.CmdArgs.Implicit+ ( (&=)+ , cmdArgs, def, details, explicit, help+ , isLoud, name, summary, typ, verbosity+ )+import "this" PrettyDevList ( ppDevices, brightStyle, darkStyle )+import "this" Paths_ls_usb ( version )+import "usb" System.USB.Initialization+ ( Verbosity(PrintNothing), newCtx, setDebug )+import "usb" System.USB.Enumeration+ ( Device, getDevices, deviceDesc, busNumber, deviceAddress )+import "usb" System.USB.Descriptors+ ( VendorId, ProductId, deviceVendorId, deviceProductId )+import "usb-id-database" System.USB.IDDB.LinuxUsbIdRepo ( staticDb ) --------------------------------------------------------------------------------