aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-12-10 14:36:58 +0000
committerLouis Pilfold <louis@lpil.uk>2024-12-10 14:36:58 +0000
commitf15d41b5087d286b4862e2d5dea5382961daef55 (patch)
treee130ddc91dec73c8839e603a5fbebd5aef9d0f96
parent370a060299cc9aeca4b37c3a36ce392055599815 (diff)
downloadgleam_stdlib-f15d41b5087d286b4862e2d5dea5382961daef55.tar.gz
gleam_stdlib-f15d41b5087d286b4862e2d5dea5382961daef55.zip
v0.47.0v0.47.0
-rw-r--r--CHANGELOG.md5
-rw-r--r--gleam.toml2
-rw-r--r--src/gleam/bool.gleam27
3 files changed, 8 insertions, 26 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f0a014..8122997 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## v0.47.0 - 2024-12-10
+
+- The `compare` and `to_string` functions from the `gleam/bool` module have been
+ deprecated.
+
## v0.46.0 - 2024-12-08
- Improved the performance of comparing two `Dict`s of equal size on the
diff --git a/gleam.toml b/gleam.toml
index 985ca7c..3ce6d59 100644
--- a/gleam.toml
+++ b/gleam.toml
@@ -1,5 +1,5 @@
name = "gleam_stdlib"
-version = "0.46.0"
+version = "0.47.0"
gleam = ">= 0.32.0"
licences = ["Apache-2.0"]
description = "A standard library for the Gleam programming language"
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam
index ced8005..6c14d68 100644
--- a/src/gleam/bool.gleam
+++ b/src/gleam/bool.gleam
@@ -192,17 +192,7 @@ pub fn exclusive_nor(a: Bool, b: Bool) -> Bool {
a == b
}
-/// Compares two bools and returns the first value's `Order` to the second.
-///
-/// ## Examples
-///
-/// ```gleam
-/// import gleam/order
-///
-/// compare(True, False)
-/// // -> order.Gt
-/// ```
-///
+@deprecated("Please use a case expression to get the behaviour you desire")
pub fn compare(a: Bool, with b: Bool) -> Order {
case a, b {
True, True -> order.Eq
@@ -212,20 +202,7 @@ pub fn compare(a: Bool, with b: Bool) -> Order {
}
}
-/// Returns a numeric representation of the given bool.
-///
-/// ## Examples
-///
-/// ```gleam
-/// to_int(True)
-/// // -> 1
-/// ```
-///
-/// ```gleam
-/// to_int(False)
-/// // -> 0
-/// ```
-///
+@deprecated("Please use a case expression to get the behaviour you desire")
pub fn to_int(bool: Bool) -> Int {
case bool {
False -> 0