[Haskell-cafe] Network trouble: what to do?

Creighton Hogg wchogg at gmail.com
Wed Oct 15 09:54:17 EDT 2008

So in my quest to create bindings to BlueZ in Haskell, I've hit a bit
of a snag:  sockets programming.

In C, you can use the standard sockets library and just pass around
addresses as arrays of 6 bytes instead of arrays of 4 bytes like you
normally would.  The problem I'm having is that in Network.Socket,
there's no such wiggle room and you have to either provide a Word32 or
four Word32's to represent the address.

Is there a way around this that I just haven't seen, or should I write
a patch to Network to add an extra constructor to SockAddr and code to
handle it?


More information about the Haskell-Cafe mailing list