[Haskell] Re: Existing Haskell IPv6 Code

Peter Simons simons at cryp.to
Tue May 10 05:48:12 EDT 2005


Shae Matijs Erisson writes:

 > Einar Karttunen's network-alt supports IPv6, datagram, and more:
 > http://www.cs.helsinki.fi/u/ekarttun/network-alt/

Duh, I didn't even know this library existed! Thanks for the
pointer.

Judging from a quick glance, the code seems to marshal the
POSIX API:

  type SockAddrLen   = Int
  data SockAddrT
  type SockAddr      = ForeignPtr SockAddrT
  data SocketAddress = SA !SockAddr !SockAddrLen

I'm not sure whether that's a useful representation. It
works, of course, but it appears that an address is
essentially opaque (unless you want to do more FFI things).
It doesn't really unify different types of network addresses
either. Note, for example, that you can't pass such an
address to the 'connectTCP' function.

Peter



More information about the Haskell mailing list