The usb-safe package

[Tags:bsd3, library]

The usb package provides a standard Haskell abstraction layer over bindings-libusb providing: abstract types instead of Ptrs, automatic marshalling and unmarshalling, automatic garbage collection, exceptions instead of integer return codes, etc..

While all that is very nice there are still some things that you can do wrong. For example doing I/O with a closed device or reading from or writing to an endpoint which doesn't belong to the claimed interface. Or reading from an Out endpoint or writing to an In endpoint.

usb-safe provides the following guarantees:

The primary technique used in usb-safe is called "Lightweight monadic regions" which was invented by Oleg Kiselyov and Chung-chieh Shan. See:

http://okmij.org/ftp/Haskell/regions.html#light-weight

This technique is implemented in the regions package which is re-exported from usb-safe.

See the usb-safe-examples package for examples how to use this library:

darcs get http://code.haskell.org/~basvandijk/code/usb-safe-examples

Properties

Versions 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.5, 0.5.1, 0.5.1.1, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.11.0.1, 0.11.0.2, 0.12, 0.13, 0.14
Dependencies base (>=4 && <4.3), base-unicode-symbols (>=0.1.1 && <0.3), bytestring (==0.9.*), iteratee (>=0.3.5 && <0.4), MonadCatchIO-transformers (==0.2.*), regions (==0.6.*), transformers (==0.2.*), usb (==0.5.*), usb-enumerator (==0.1.*) [details]
License BSD3
Copyright 2009–2010 Bas van Dijk
Author Bas van Dijk <v.dijk.bas@gmail.com>
Maintainer Bas van Dijk <v.dijk.bas@gmail.com>
Stability experimental
Category System, Monadic Regions
Source repository head: darcs get http://code.haskell.org/~basvandijk/code/usb-safe
Uploaded Mon Jul 26 05:49:15 UTC 2010 by BasVanDijk
Distributions NixOS:0.14
Downloads 3217 total (44 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees