aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Puc <marcin.e.puc@gmail.com>2021-07-21 21:19:58 +0200
committerLouis Pilfold <louis@lpil.uk>2021-07-26 22:23:04 +0100
commit035d0437c0523f5a509140b370411c8a76c33788 (patch)
treec0684c938f17147aab9cd33df53e365f6c260163 /src
parent3d977c8f9c19ddb85ba9c0b59bd4aee688264dd6 (diff)
downloadgleam_stdlib-035d0437c0523f5a509140b370411c8a76c33788.tar.gz
gleam_stdlib-035d0437c0523f5a509140b370411c8a76c33788.zip
Restore Result and Bool module comments
Diffstat (limited to 'src')
-rw-r--r--src/gleam/bool.gleam8
-rw-r--r--src/gleam/result.gleam3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam
index e016168..22d0663 100644
--- a/src/gleam/bool.gleam
+++ b/src/gleam/bool.gleam
@@ -1,3 +1,11 @@
+//// A type with two possible values, True and False. Used to indicate whether
+//// things are... true or false!
+////
+//// Often is it clearer and offers more type safety to define a custom type
+//// than to use Bool. For example, rather than having a `is_teacher: Bool`
+//// field consider having a `role: SchoolRole` field where SchoolRole is a custom
+//// type that can be either Student or Teacher.
+
import gleam/order.{Order}
/// Returns the opposite bool value.
diff --git a/src/gleam/result.gleam b/src/gleam/result.gleam
index cbc2f0b..01c5510 100644
--- a/src/gleam/result.gleam
+++ b/src/gleam/result.gleam
@@ -1,3 +1,6 @@
+//// Result represents the result of something that may succeed or not.
+//// `Ok` means it was successful, `Error` means it was not successful.
+
import gleam/list
/// Checks whether the result is an Ok value.