Calculate the length of a Builder without executing it
- 主要言語
- Haskell
- スター
- 120
- フォーク
- 70
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In the ELF format, there are absolute offsets pointing to positions after the offset.
Thus, calculating this offset requires knowing the length of several Builders, including the length of the Builder that will contain the offset itself.
With the current API and a naive approach that would force the Builders into lazy ByteStrings, you'd end up with <>.
One simple solution, suggested by Joe Hendrix, is to wrap the Builder in a type that contains the Builder and it's length.
data SizedBuilder = SB Int64 Builder
length (SB l _) = l
… + additional methods exported by Data.Binary.Builder
This API could be exposed from Data.Binary.Builder.Sized.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず Data.Binary.Builder と、提案されている Data.Binary.Builder.Sized モジュールを読んでください。SizedBuilder API が長さを保持し、その長さと追加の Builder メソッドを公開し、説明されている再帰ループがない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- haskell
- 領域
- data
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100