haskell/network — pull request #70 by joeyadams (2012-11-25 05:17:44+00:00)
Title: Add Network.Socket.Types (internal reorganization)

This moves the definition of some types (`Socket`, `SockAddr`, etc.) and some of their helper functions to a new hidden module called `Network.Socket.Types`. This moves a lot of code around, but does not change the external interface.

I also added these accessors, but did not export them to users:

sockFd (MkSocket n _ _ _ _) = n
sockFamily (MkSocket _ f _ _ _) = f
sockType (MkSocket _ _ t _ _) = t
sockProtocol (MkSocket _ _ _ p _) = p
sockStatus (MkSocket _ _ _ _ s) = s

I'm working on a new [IO manager for Windows][1] based on [completion ports][2]. Having a `Types` module will let me implement Windows-specific bindings in a separate module, rather than clutter `Network.Socket` even more.

[1]: http://hackage.haskell.org/trac/ghc/ticket/7353
[2]: http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx