Skip to content

Add deprecated logical methods #7482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions runtime/Stdlib_BigInt.res
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ external toLocaleString: bigint => string = "toLocaleString"

let toInt = t => t->toFloat->Stdlib_Int.fromFloat

external \"+": (bigint, bigint) => bigint = "%addbigint"
external \"-": (bigint, bigint) => bigint = "%subbigint"
external \"*": (bigint, bigint) => bigint = "%mulbigint"
external \"/": (bigint, bigint) => bigint = "%divbigint"
external \"~-": bigint => bigint = "%negbigint"
external \"~+": bigint => bigint = "%identity"
external \"**": (bigint, bigint) => bigint = "%powbigint"

external add: (bigint, bigint) => bigint = "%addbigint"
external sub: (bigint, bigint) => bigint = "%subbigint"
external mul: (bigint, bigint) => bigint = "%mulbigint"
Expand All @@ -93,7 +85,6 @@ external mod: (bigint, bigint) => bigint = "%modbigint"
external bitwiseAnd: (bigint, bigint) => bigint = "%andbigint"
external bitwiseOr: (bigint, bigint) => bigint = "%orbigint"
external bitwiseXor: (bigint, bigint) => bigint = "%xorbigint"

external bitwiseNot: bigint => bigint = "%bitnot_bigint"

external shiftLeft: (bigint, bigint) => bigint = "%lslbigint"
Expand All @@ -106,3 +97,21 @@ external shiftRight: (bigint, bigint) => bigint = "%asrbigint"
without having to store or process it further.
*/
external ignore: bigint => unit = "%ignore"

@deprecated("Use `&` operator or `bitwiseAnd` instead.")
external land: (bigint, bigint) => bigint = "%andbigint"

@deprecated("Use `bitwiseOr` instead.")
external lor: (bigint, bigint) => bigint = "%orbigint"

@deprecated("Use `^` operator or `bitwiseXor` instead.")
external lxor: (bigint, bigint) => bigint = "%xorbigint"

@deprecated("Use `~` operator or `bitwiseNot` instead.")
external lnot: bigint => bigint = "%bitnot_bigint"

@deprecated("Use `<<` operator or `shiftLeft` instead.")
external lsl: (bigint, bigint) => bigint = "%lslbigint"

@deprecated("Use `>>` operator or `shiftRight` instead.")
external asr: (bigint, bigint) => bigint = "%asrbigint"