stdio

Haskell Standard Input and Output

This project is maintained by haskell-stdio

Design overview

haskell-stdio is a self contained IO toolkit for Haskell (more specifically, GHC), modules can be divided into three categories:

  1. Packed data structures:

  2. IO related stuff:

    • Buffered IO support, for reading and writing Bytes.

      • Std.IO.Buffered Input and Output device, BufferedInput and BufferedOutput operations.
    • Standard input and output stream.
    • TCP socket support.
    • FileSystem support, with special path type CBytes.
    • Simple yet fast Logger.
    • High performance low resolution timers.
    • Resource management and exceptions.
  3. Internal modules for hackers:

    • High performance IO management built upon libuv and GHC RTS.

Currently we also have plans to support more things such as JSON protocols, UDP socket, etc, which will also built upon works above. Basically we focus on engineering infrastructure only. Please join in!

We have published a paper on our IO manager at Haskell Symposium 2018, it’s available here.

Here is a video recorded @shenzhen chinese haskell meeting by @winterland1989, it explains almost every detail how do we combine GHC’s lightweight thread with libuv’s event loop in haskell-stdio.

libuv based I/O manager