Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Outcome printer formats the bigint sign by hand instead of `Bigint_utils.to_string`

オープン 初心者向け
#8,763 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ocaml
領域
compilers

調査の方向性

compiler/syntax/src/res_outcome_printer.ml の 486-487 行目付近にある bigint 定数のケースから始めてください。ここでは符号と桁を手作業で連結しています。compiler/ml/bigint_utils.ml の Bigint_utils.to_string と比較し、res_core.ml が syntax ライブラリからすでに Bigint_utils をどのように呼び出しているかを確認してください。printer が共有ヘルパーを呼び出し、手書きの符号処理が削除され、正の bigint と負の bigint の出力が変わらなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

Found by differential semantic drift analysis from ece8b148 to a7721303.

What is broken

res_outcome_printer.ml L486-L487 formats a bigint constant by hand: (if positive then "" else "-") ^ digits ^ "n". The same logic exists as Bigint_utils.to_string, used by printlambda.ml and printtyped.ml. #8732 fixed a sign bug in exactly this hand-written copy. The syntax library already depends on ml and uses Bigint_utils (res_core.ml), so the printer can call the shared helper and keep one definition of the sign convention.

Possible cause (speculation only)

A guess: the fix in #8732 corrected the copy in place, the smallest change, rather than replacing it with the shared helper.

主要言語
OCaml
スター
7.5k
フォーク
484
平均マージ
22時間 10分
マージ済み PR(30日)
70

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rescript-lang/rescript のほかの issue

rescript-lang/rescript の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

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

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