1![GitHub Actions status](https://github.com/haskell/network/workflows/Haskell%20CI/badge.svg)
2# [`network`](http://hackage.haskell.org/package/network)
3
4To build this package directly from git, you must run `autoreconf -i`.
5And then use `cabal configure; cabal build` or `stack build`.
6
7## Support Policy
8
9### GHC
10
11The `network` package support [3 major versions of GHC](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/intro.html#ghc-version-numbering-policy) only.
12This means that the current stable version and two previous stable versions are supported.
13However, all GHC 8.x are supported currently.
14
15### Windows
16
17We use MSYS to build this package on Windows.
18To use the `network` package on Cygwin, use `stack`.
19
20## Coding
21
22### .hs files
23
24If you need C macros created by "configure" or `CALLCONV`/`SAFE_ON_WIN`, put
25
26```
27#include "HsNetDef.h"
28```
29
30"HsNet.h" does now work well since Mac's cpp sucks.
31
32### .hsc files
33
34If you need `#peek`, `#poke` and others, create a `.hsc` file with
35
36```
37#include "HsNet.h"
38```
39
40`HsNet.h` includes `HsNefDef.h` and necessary C structures.
41Unfortunately, `hsc2hs` does not convert C macros.
42So, if you use `CALLCONV`/`SAFE_ON_WIN`, the following is also necessary:
43
44```
45##include "HsNetDef.h"
46```
47
48## Milestones
49
50### 2.6
51
52- [x] Making `SockAddrCan` deprecated
53
54### 2.7
55
56See https://github.com/haskell/network/issues/296
57
58- [x] Making `Network` deprecated
59- [x] Making `Network.BSD` deprecated
60- [x] Making `MkSocket` deprecated
61- [x] Making many APIs deprecated
62
63### 2.8
64
65- [x] Stop exporting the `PortNum` Constructor in `PortNumber`
66
67### 3.0
68
69- [x] Removing `Network`
70- [x] Removing `Network.BSD`
71- [x] Removing `SockAddrCan`
72- [x] Changing the internal structure of `Socket`.
73- [x] Make address extensible.
74- [x] Remove EOF errors
75