Open and answer this issue on GitHub.
ready, solver · opened 2026-11-23 · updated 2026-11-23 · 0 comments
Filed by the driver from the Found: of the run of issue-2749 (#2749); decided by the solver supervisor on 2026-11-23 as an obvious extension. It is the inverse of to_text(), read the way text::parse_i64 reads, with null for no number as ADR-293 D1 says.
Part I 2.2 (docs/specification/10-nikaia-light.md, the BigInt paragraph, commit 93705904a) now says:
BigInt::parse(text) -> BigInt?reads that text back: the digits astext::parse_i64reads them, with no limit on their number, andnullwhere they write no number.
That means one optional leading - or +, then at least one ASCII digit and nothing else. Anything else gives null: an empty text, a sign alone, a space, any other character.
On develop c7a59cf67, use std::bigint / fn main() throws { let b: bigint::BigInt = bigint::BigInt::parse("123456789012345678901234567890") ?? bigint::BigInt::of(0); println(b.to_text()) } gives error[NK1245]: The compiler can't tell what type bigint::BigInt::parse("123456789012345678901234567890") is. and exits 1. The cause is certain: crates/nikaia-std/src/bigint.nika has no parse (its makers are of and from_wide, at lines 258-263).
pub fn parse(text: ref String) -> BigInt? sync to BigInt in crates/nikaia-std/src/bigint.nika, written in Nikaia on the type’s own digit methods. Its lowered .rs is output (lower-std).tests/compiler/tests/ with its .stdout. It should round-trip to_text() for 0, -0, ±1, i64 min and max, and a value of 30+ digits, positive and negative. It should also cover +5, 007 (reads as 7), and null for "", "-", "+", "1 2", "12a" and "--1".The probe above prints 123456789012345678901234567890 and exits 0, and the new test is green. #2749 (BigInt Farkas multipliers in the certificate) waits for this.