anmonteiro / anmonteiro/httpun

Improve order of arguments in Httpun_eio.Server.create_connection_handler for currying

オープン
#154 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
OCaml
スター
63
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

説明

(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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。