diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gleam/bit_builder.gleam | 7 | ||||
-rw-r--r-- | src/gleam/dynamic.gleam | 6 | ||||
-rw-r--r-- | src/gleam/map.gleam | 6 | ||||
-rw-r--r-- | src/gleam/string.gleam | 2 | ||||
-rw-r--r-- | src/gleam/uri.gleam | 11 |
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. /// |