Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Closed Beginner friendly
#8,763 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
ocaml
Domain
compilers

Research direction

Start at the bigint constant case in compiler/syntax/src/res_outcome_printer.ml around lines 486-487, where the sign and digits are joined by hand. Compare it with Bigint_utils.to_string in compiler/ml/bigint_utils.ml, and check how res_core.ml already calls Bigint_utils from the syntax library. Done when the printer calls the shared helper, the hand-written sign logic is gone, and printed output is unchanged for positive and negative bigints.

Written by the indexing model from the issue text.

Description

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.

Dominant language
OCaml
Stars
7.5k
Forks
484
Avg merge
19h 46m
Merged PRs (30d)
81

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rescript-lang/rescript

All issues in rescript-lang/rescript

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.