[Haskell-cafe] ANNOUNCE: usb-safe-0.4.1
Bas van Dijk
v.dijk.bas at gmail.com
Wed Dec 23 18:23:33 EST 2009
I just released usb-safe-0.4.1:
Changes compared to 0.3 (I didn't make an announcement for 0.4):
* Tested with ghc-6.12.1 and base-220.127.116.11.
* It turned out that an Interface can also be regarded as a scarce
resource: it needs to be claimed before use and it needs to be
released when you're done with it. So just as with USB devices I had
to create a new region monad that supported claiming of interfaces. So
now I had two region monads: a DeviceRegion and an InterfaceRegion
which both were implemented exactly the same and supported the exact
same operations. So the next thing I did was to generalize the region
code and put it in its own package: 'regions'. This package will be
* Removed the FilteredEndpoint type. Specific endpoints can now be
retrieved from the alternate directly using: 'getEndpoints'.
* Added missing language extension: OverlappingInstances (The package
was unusable without it)
* Added convenience functions 'setConfigWhich', 'withInterfaceWhich'
and 'setAlternateWhich' for quickly setting the first setting that
satisfies the given predicate on its descriptor.
* Hidden the ReadEndpoint and WriteEndpoint type classes so users
can't write their own instances for it and thereby potentially messing
up my safety guarantees.
* Lots of little refactorings (is that a real word?): documentation
updates, explicit imports of all used symbols, Unicode syntax and
symbols (using the base-unicode-symbols package)
* Finally I packaged up some example code in:
darcs get http://code.haskell.org/~basvandijk/code/usb-safe-examples/
More information about the Haskell-Cafe