aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2022-04-16 11:53:28 +0100
committerLouis Pilfold <louis@lpil.uk>2022-04-16 11:53:28 +0100
commit7615c39a65d33f9faebbfea138f0b2f3397257e6 (patch)
tree117f5cd85eb066f34434d61ea48737ba2233426b /src
parentee95f4b1149778d36f1b570779b87402aade702e (diff)
downloadgleam_stdlib-7615c39a65d33f9faebbfea138f0b2f3397257e6.tar.gz
gleam_stdlib-7615c39a65d33f9faebbfea138f0b2f3397257e6.zip
Remove unused imports
Diffstat (limited to 'src')
-rw-r--r--src/gleam/bit_builder.gleam7
-rw-r--r--src/gleam/dynamic.gleam6
-rw-r--r--src/gleam/map.gleam6
-rw-r--r--src/gleam/string.gleam2
-rw-r--r--src/gleam/uri.gleam11
5 files changed, 20 insertions, 12 deletions
diff --git a/src/gleam/bit_builder.gleam b/src/gleam/bit_builder.gleam
index 49892e8..a3791c8 100644
--- a/src/gleam/bit_builder.gleam
+++ b/src/gleam/bit_builder.gleam
@@ -13,8 +13,11 @@
//// On Erlang this type is compatible with Erlang's iolists.
import gleam/string_builder.{StringBuilder}
-import gleam/bit_string
-import gleam/list
+
+if javascript {
+ import gleam/list
+ import gleam/bit_string
+}
if erlang {
pub external type BitBuilder
diff --git a/src/gleam/dynamic.gleam b/src/gleam/dynamic.gleam
index 50345fb..c91f468 100644
--- a/src/gleam/dynamic.gleam
+++ b/src/gleam/dynamic.gleam
@@ -1,13 +1,15 @@
-import gleam/bit_string
import gleam/list
import gleam/map
import gleam/int
-import gleam/option
import gleam/result
import gleam/string_builder
import gleam/map.{Map}
import gleam/option.{Option}
+if erlang {
+ import gleam/bit_string
+}
+
/// `Dynamic` data is data that we don't know the type of yet.
/// We likely get data like this from interop with Erlang, or from
/// IO with the outside world.
diff --git a/src/gleam/map.gleam b/src/gleam/map.gleam
index b801f44..9ec83e0 100644
--- a/src/gleam/map.gleam
+++ b/src/gleam/map.gleam
@@ -1,7 +1,9 @@
-import gleam/result
import gleam/option.{Option}
import gleam/list
-import gleam/pair
+
+if javascript {
+ import gleam/pair
+}
/// A dictionary of keys and values.
///
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index 8ff8fcd..49e7f73 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -5,10 +5,10 @@ import gleam/string_builder
import gleam/iterator.{Iterator}
import gleam/list
import gleam/order
-import gleam/result
import gleam/option.{None, Option, Some}
if erlang {
+ import gleam/result
import gleam/dynamic.{Dynamic}
}
diff --git a/src/gleam/uri.gleam b/src/gleam/uri.gleam
index 514a7ff..8bb1746 100644
--- a/src/gleam/uri.gleam
+++ b/src/gleam/uri.gleam
@@ -7,17 +7,18 @@
//// Query encoding (Form encoding) is defined in the w3c specification.
//// https://www.w3.org/TR/html52/sec-forms.html#urlencoded-form-data
-import gleam/function
import gleam/string_builder.{StringBuilder}
import gleam/int
import gleam/list
-import gleam/map
import gleam/option.{None, Option, Some}
-import gleam/pair
-import gleam/regex
-import gleam/result
import gleam/string
+if javascript {
+ import gleam/pair
+ import gleam/regex
+ import gleam/result
+}
+
/// Type representing holding the parsed components of an URI.
/// All components of a URI are optional, except the path.
///