network-transport-0.4.4.0
Opened this issue · 3 comments
Is a dependency for distributed-process.
Offending code:
#ifdef mingw32_HOST_OS
foreign import stdcall unsafe "htonl" htonl :: CInt -> CInt
foreign import stdcall unsafe "ntohl" ntohl :: CInt -> CInt
foreign import stdcall unsafe "htons" htons :: CShort -> CShort
foreign import stdcall unsafe "ntohs" ntohs :: CShort -> CShort
#else
foreign import ccall unsafe "htonl" htonl :: CInt -> CInt
foreign import ccall unsafe "ntohl" ntohl :: CInt -> CInt
foreign import ccall unsafe "htons" htons :: CShort -> CShort
foreign import ccall unsafe "ntohs" ntohs :: CShort -> CShort
#endif
Nothing fancy. It is used to convert numbers to network-order bytestrings.
I've downloaded etlas
merely an hour ago, so no PR for now 😉
Java doesn't really have much of a concept of "network" and "host" byte order. We did tackle this problem in the network
package itself. Take a look at the network patch (Note that it's incomplete - we just ported enough to get the wai
package working).
And on another note, Eta has a nice (hidden) feature that all Eta closures are serialisable so you can send closures over the wire w/o static pointers and distributed-process! The functionality is not yet exposed, but I'd be happy to add a bit of documentation if you're interested in playing around with it.
Oh... the DP itself has indeed loads of TH for closure magic, so this patch would'n help that much.