Open Issues Need Help
View All on GitHubAI Summary: This GitHub issue proposes adding three helper functions (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`) to MoonBit's `Result` type. Currently, these functions are only available on the `Option` type. The goal is to achieve API consistency between `Option` and `Result`, as they are conceptually equivalent (`Option[T]` is like `Result[T, Unit]`).
AI Summary: This issue reports a bug where attempting to transfer a queue to itself using `q.transfer(q)` incorrectly empties the queue. The expected behavior is for the queue to remain unchanged, acting as a no-op.
AI Summary: Implement a `ReadonlyArray` type in the MoonBit core library. This type should have the same layout as a standard `Array` but with a restricted interface that prevents modifications. Conversion functions (`from_array`, `to_array`, `unsafe_from_array`, `unsafe_to_array`) between `ReadonlyArray` and `Array` are also required.
AI Summary: Implement an arbitrary-precision decimal type in the MoonBit core library, similar to .NET's decimal type, to support accurate monetary calculations. This involves designing the type, handling precision, and providing necessary functions for string conversion, JSON serialization, and other common operations.