| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Fri, 16 Jan 2026 23:18:57 GMT
X-Served-By: cache-dfw-kdal2120055-DFW, cache-bom-vanm7210056-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768605537.956990,VS0,VE308
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
Z-IO: Simple and high performance IO toolkit for Haskell
[Skip to Readme]
Z-IO: Simple and high performance IO toolkit for Haskell
Simple and high performance IO toolkit for Haskell, including file system, network, ipc and more!
[Skip to Readme]
Modules
[Index] [Quick Jump]
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| no-pkg-config | Don't use pkg-config to check for library dependences(on platforms other than linux, win and osx) | Disabled |
Automatic Flags
| Name | Description | Default |
|---|---|---|
| demos | Build benchamrk/demonstration programs | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- Z-IO-2.0.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.2.0, 0.1.3.0, 0.1.4.0, 0.1.5.0, 0.1.5.1, 0.1.5.2, 0.1.6.0, 0.1.6.1, 0.1.7.0, 0.1.8.0, 0.1.8.1, 0.1.9.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.5.0.0, 0.6.0.0, 0.6.1.0, 0.6.2.0, 0.6.3.0, 0.6.4.0, 0.7.0.0, 0.7.1.0, 0.8.0.0, 0.8.1.0, 0.8.1.1, 1.0.0.0, 1.0.1.0, 1.0.2.0, 2.0.0.0 (info) |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | base (>=4.16 && <5.0), containers (>=0.6 && <0.7), exceptions (>=0.10 && <0.11), foldl (>=1.3 && <2.0), primitive (>=0.7.3 && <0.8), stm (>=2.5 && <2.6), time (>=1.9 && <2.0), unix-time (>=0.4.7 && <0.5), unordered-containers (>=0.2 && <0.3), Z-Data (>=2.0 && <3.0), Z-IO [details] |
| License | BSD-3-Clause |
| Copyright | (c) Z.Haskell Contributors |
| Author | Z.Haskell Contributors |
| Maintainer | winterland1989@gmail.com |
| Uploaded | by lyndward at 2022-11-26T03:59:17Z |
| Category | Data |
| Home page | https://github.com/ZHaskell/Z-IO |
| Bug tracker | https://github.com/ZHaskell/Z-IO/issues |
| Source repo | head: git clone git://github.com/ZHaskell/z-io.git |
| Distributions | |
| Reverse Dependencies | 4 direct, 0 indirect [details] |
| Executables | z-io-http-bench |
| Downloads | 10629 total (109 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2022-11-26 [all 1 reports] |
Readme for Z-IO-2.0.0.0
[back to package description]Z-IO
This package is part of Z.Haskell project, provides basic IO operations:
- IO resource management, resource pool
- File system operations
- Network: DNS, TCP, UDP and IPC
- Buffered input and output
- Process management
- Environment settings
- High performance logger
- High performance low resolution timer
Requirements
- A working haskell compiler system, GHC(>=8.6), cabal-install(>=2.4), hsc2hs.
- Tests need hspec-discover.
Example usage
> :set -XOverloadedStrings
> import Z.IO.Network
> import Z.IO.Resource
> import Z.IO.Buffered
>
> -- call getAddrInfo to perform DNS
> head <$> getAddrInfo Nothing "www.bing.com" "http"
AddrInfo {addrFlags = [AI_ADDRCONFIG,AI_V4MAPPED], addrFamily = SocketFamily 2, addrSocketType = SocketType 1, addrProtocol = ProtocolNumber 6, addrAddress = 204.79.197.200:80, addrCanonName = ""}
>
> import qualified Z.Data.Text as T
> -- send a simple HTTP request
> :{
let addr = ipv4 "13.107.21.200" 80
in withResource (initTCPClient defaultTCPClientConfig{ tcpRemoteAddr = addr}) $ \ tcp -> do
(i, o) <- newBufferedIO tcp
writeBuffer' o "GET https://www.bing.com HTTP/1.1\r\nHost: www.bing.com\r\n\r\n"
readBuffer i >>= pure . T.validate
:}
"HTTP/1.1 200 OK\r\nDate: Sat, 19 Sep 2020 06:11:08 GMT\r\nContent-Length: 0\r\n\r\n"
>
> -- Start a TCP echo server, use @nc -v localhost 8080@ to test
> :{
startTCPServer defaultTCPServerConfig{
tcpListenAddr = SocketAddrIPv4 ipv4Loopback 8080} $ \ tcp -> do
i <- newBufferedInput tcp
o <- newBufferedOutput tcp
forever $ readBuffer i >>= writeBuffer o >> flushBuffer o
}
:}
Dev guide
# get code
git clone --recursive git@github.com:ZHaskell/z-io.git
cd z-io
# build
cabal build
# test
cabal run Z-IO-Test
# install
cabal install
# generate document
cabal haddock