The network package conditionally defines things depending on the capabilities of the platform, e.g.:
data Family
=
[...]
#ifdef AF_INET6
| AF_INET6 -- Internet Protocol version 6
#endif
[...]
This makes it impossible to write portable programs. Please instead define the datatypes etc unconditionally, and change the code so that, for example, it throws an exception if an unsupported family is used, and perhaps also provide functions like
supportedFamily :: Family -> Bool