Skip to content

Missing newtypes for socklen_t and nfds_t in System.Posix.Types

Motivation

The POSIX-specified types nfds_t and socklen_t are missing from System.Posix.Types. I've written bindings where I needed socklen_t before, but I was able to work around it since socklen_t is just a C int on every platform. However, this is not true for nfds_t. This type would be helpful for writing cross-platform bindings correctly.

Proposal

Add newtype CSocklen and newtype CNfds to System.Posix.Types in base. I'm happy to do this if others agree with the suggestion.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information