anmonteiro / anmonteiro/httpun
Improve order of arguments in Httpun_eio.Server.create_connection_handler for currying
- Dominant language
- OCaml
- Stars
- 63
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
(see also anmonteiro/ocaml-h2#258)
The last two arguments of:
```ocaml
Httpun_eio.Server.create_connection_handler ... client_addr socket
```
should be switched to:
```ocaml
Httpun_eio.Server.create_connection_handler ... socket client_addr
```
This would allow for currying in `Eio.Net.run_server`, i.e. simplifying usage from:
```ocaml
let connection_handler socket client_addr =
Httpun_eio.Server.create_connection_handler ... client_addr socket
in
Eio.Net.run_server ... connection_handler
```
to:
```ocaml
let connection_handler = Httpun_eio.Server.create_connection_handler ... in
Eio.Net.run_server ... connection_handler
```
@anmonteiro Would you accept a PR that fixed this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.