Simple network sockets usage patterns.

Version on this page:
LTS Haskell 21.24:0.4.5
Stackage Nightly 2023-12-08:0.4.5
Latest on Hackage:0.4.5

See all snapshots network-simple appears in

BSD-3-Clause licensed by Renzo Carbonara
Maintained by renzocarbonaraλ
This version can be pinned in stack with:network-simple-,1383

Module documentation for

  • Network
    • Network.Simple
      • Network.Simple.TCP


Build Status

Haskell library abstracring over simple network sockets usage patterns. Currently, only TCP sockets are supported. Support for UDP and Unix sockets is planned for future versions.

Check the source or rendered Haddocks for extensive documentation.

This code is licensed under the terms of the so called 3-clause BSD license. Read the file named LICENSE found in this same directory for details.

See the PEOPLE file to learn about the people involved in this effort.



  • Workaround sendLazy build issues in Windows 8 (see #13).

  • Bump upper bound on network dependency.


  • Add sendLazy and sendMany to Network.Simple.TCP.

Version 0.4

  • Bump lower and upper bounds exceptions dependency. Replacing some uses of MonadCatch with `MonadMask.

  • Bump upper bound on network dependency.

  • Bump upper bound on transformers dependency.

Version 0.3.1

  • Bumped upper-bounds on exceptions dependency.

Version 0.3.0

  • Re-export Network.Socket.close at Network.Simple.TCP, except called closeSock.

  • Re-export Socket, SockAddr, HostName and ServiceName from Network.Socket at Network.Simple.TCP.

  • Generalize the IO monad by using MonadIO and MonadCatch (from the exceptions library).


  • Export send and recv from Network.Simple.TCP.

  • Re-export Network.Socket.withSocketsDo from Network.Simple.TCP.


  • FIX: acceptFork now properly closes the connection socket, even in case of asynchronous exceptions.


  • Network.Simple.TCP.serveFork was renamed to serve, and the previous function named serve was removed.


  • Fixed typos, including the maintainer email.


  • First release.