aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam/bool.gleam3
-rw-r--r--src/gleam/float.gleam3
-rw-r--r--src/gleam/int.gleam3
-rw-r--r--src/gleam/list.gleam3
-rw-r--r--src/gleam/result.gleam6
-rw-r--r--src/gleam/string.gleam3
6 files changed, 21 insertions, 0 deletions
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam
index 76476c3..8dcc614 100644
--- a/src/gleam/bool.gleam
+++ b/src/gleam/bool.gleam
@@ -2,6 +2,9 @@
import gleam/order.{Order}
+pub type Bool =
+ Bool
+
/// Returns the opposite Bool value
///
/// ## Examples
diff --git a/src/gleam/float.gleam b/src/gleam/float.gleam
index 6d6ab49..9de1549 100644
--- a/src/gleam/float.gleam
+++ b/src/gleam/float.gleam
@@ -4,6 +4,9 @@ import gleam/iodata
import gleam/order.{Order}
import gleam/result.{Option}
+pub type Float =
+ Float
+
/// Attempts to parse the String as a Float if possible
///
/// ## Examples
diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam
index bd264fd..b663940 100644
--- a/src/gleam/int.gleam
+++ b/src/gleam/int.gleam
@@ -3,6 +3,9 @@
import gleam/order.{Order}
import gleam/result.{Option}
+pub type Int =
+ Int
+
/// Attempts to parse the String as an Int if possible
///
/// ## Examples
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index 4b832bc..fbc3ab5 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -3,6 +3,9 @@ import gleam/pair
import gleam/order.{Order}
import gleam/result.{Option}
+pub type List(elements) =
+ List(elements)
+
pub type LengthMismatch {
LengthMismatch
}
diff --git a/src/gleam/result.gleam b/src/gleam/result.gleam
index 5b3170d..e4ea275 100644
--- a/src/gleam/result.gleam
+++ b/src/gleam/result.gleam
@@ -1,6 +1,12 @@
/// Result represents the result of something that may succeed or fail.
/// `Ok` means it was successful, `Error` means it failed.
+pub type Result(success, error) =
+ Result(success, error)
+
+pub type Nil =
+ Nil
+
/// Returns whether the value is Ok
///
pub fn is_ok(result: Result(a, e)) -> Bool {
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index 5b43dd6..46b1a25 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -6,6 +6,9 @@ import gleam/list
import gleam/order
import gleam/result.{Option}
+pub type String =
+ String
+
/// ## Basics
/// Determine if a string is empty.