diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-06-02 19:48:56 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-06-02 21:12:59 +0100 |
commit | 96c20b8ebf8420fbba75c97fa08eaeb34e8dc394 (patch) | |
tree | 30546669b2dd307ae933f7d124c4edd4647a8ca7 | |
parent | 5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31 (diff) | |
download | gleam_stdlib-96c20b8ebf8420fbba75c97fa08eaeb34e8dc394.tar.gz gleam_stdlib-96c20b8ebf8420fbba75c97fa08eaeb34e8dc394.zip |
Import variables can have their name specified
-rw-r--r-- | gen/src/std@any.erl | 7 | ||||
-rw-r--r-- | src/std/any.gleam | 8 |
2 files changed, 3 insertions, 12 deletions
diff --git a/gen/src/std@any.erl b/gen/src/std@any.erl index 8aec08c..5a1a844 100644 --- a/gen/src/std@any.erl +++ b/gen/src/std@any.erl @@ -3,9 +3,6 @@ -export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, tuple/1, field/2]). -list_module() -> - std@list. - from(A) -> gleam__stdlib:identity(A). @@ -35,9 +32,7 @@ list_any(A) -> list(Any, Decode) -> std@result:then(list_any(Any), - fun(Capture1) -> - (list_module()):traverse(Capture1, Decode) - end). + fun(Capture1) -> std@list:traverse(Capture1, Decode) end). tuple(A) -> gleam__stdlib:decode_tuple(A). diff --git a/src/std/any.gleam b/src/std/any.gleam index c5c4a62..ac902cd 100644 --- a/src/std/any.gleam +++ b/src/std/any.gleam @@ -1,11 +1,7 @@ -import std/list +import std/list as list_mod import std/atom import std/result -fn list_module() { - list -} - // `Any` 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. @@ -47,7 +43,7 @@ external fn list_any(Any) -> Result(List(Any), String) = pub fn list(any, decode) { any |> list_any - |> result:then(_, list_module():traverse(_, decode)) + |> result:then(_, list_mod:traverse(_, decode)) } pub external fn tuple(Any) -> Result({Any, Any}, String) |