Skip to content

Commit 96c20b8

Browse files
committed
Import variables can have their name specified
1 parent 5a1f349 commit 96c20b8

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

gen/src/[email protected]

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
-export([from/1, unsafe_coerce/1, string/1, int/1, float/1, atom/1, bool/1, thunk/1, list/2, tuple/1, field/2]).
55

6-
list_module() ->
7-
std@list.
8-
96
from(A) ->
107
gleam__stdlib:identity(A).
118

@@ -35,9 +32,7 @@ list_any(A) ->
3532

3633
list(Any, Decode) ->
3734
std@result:then(list_any(Any),
38-
fun(Capture1) ->
39-
(list_module()):traverse(Capture1, Decode)
40-
end).
35+
fun(Capture1) -> std@list:traverse(Capture1, Decode) end).
4136

4237
tuple(A) ->
4338
gleam__stdlib:decode_tuple(A).

src/std/any.gleam

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import std/list
1+
import std/list as list_mod
22
import std/atom
33
import std/result
44

5-
fn list_module() {
6-
list
7-
}
8-
95
// `Any` data is data that we don"t know the type of yet.
106
// We likely get data like this from interop with Erlang, or from
117
// IO with the outside world.
@@ -47,7 +43,7 @@ external fn list_any(Any) -> Result(List(Any), String) =
4743
pub fn list(any, decode) {
4844
any
4945
|> list_any
50-
|> result:then(_, list_module():traverse(_, decode))
46+
|> result:then(_, list_mod:traverse(_, decode))
5147
}
5248

5349
pub external fn tuple(Any) -> Result({Any, Any}, String)

0 commit comments

Comments
 (0)