Readme for usb-safe-0.13

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.

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:

git clone git://github.com/basvandijk/usb-safe-examples.git