anmonteiro / anmonteiro/httpun
Improve order of arguments in Httpun_eio.Server.create_connection_handler for currying
- Lenguaje dominante
- OCaml
- Estrellas
- 63
- Forks
- 13
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
(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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.