My attempt at Haskell USB
noteed at gmail.com
Thu Jun 4 13:28:02 EDT 2009
2009/6/4 Maurício <briqueabraque at yahoo.com>:
> A few months ago, I declared here that I intended to get USB
> working in Haskell. After a lot of thinking on what could be
> a realistic goal, this is where I've got:
> I know this is probably a disapointment for most of you, but
> please try to understand the concept at the base package:
> What I'm doing is to group under these bindings-* packages
> a Haskell link to well established libraries. But Bindings.*
> modules are not supposed to be Haskell code, but C (or other
> languages, in the future?) code in Haskell.
> You may ask what good is this. Well, suppose you want to write
> a nice module, using GADTs, Template Haskell and STM, using
> functionality from libusb or other libraries bindings-* have
> links to. Just learn to use Foreign.Ptr, Foreign.Marshable and
> friends. Forget about the details of FFI, it's already done,
> and it's really time consuming and boring, believe me, I've
> been there.
> Are there other libraries you would like to have low-level
> bindings for? Just tell. I've organized and standardized things
> in a way that it is really easy to add other libraries really
> fast. Here is another example:
> Hope you can use it somehow. This is my attempt in doing
> something that may be usefull to others after all the great
> and friendly support I've had from this community in the last
> month and years. Thanks for you all, gtk2hs guys specially.
from a cursory glance at the Haddock, in the following code
foreign import ccall "libusb_get_device_address"
:: Ptr libusb_device -> IO Word8
is it normal libusb_device is written in lower case, not Libusb_device ?
More information about the Libraries