As far as I can tell, the data structure and functions in
System.Posix.IO.Select.FdSet are referentially transparent, and
it should be OK to escape the IO monad. However, POSIX requires
that all operations on fd_sets are done with valid file
descriptors. This can potentially be hard to ensure with lazy
evaluation in a pure setting, so for now this module bears the
unsafe label. On Linux, invalid file descriptors seem to be just
fine.

This converts an FdSet to a list by testing every file
descriptor in range for membership, which tends to involve invalid
file descriptors, giving undefined behavior according to POSIX. Use
inList if possible.