Skip to content

Commit 5a1f349

Browse files
committed
Enable namespaced modules
1 parent ee03f5a commit 5a1f349

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+996
-944
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- The `map_dict` module gains a `fold` function.
6+
- All modules moved under the `std` namespace.
67

78
## v0.2.0 - 2019-05-11
89

gen/src/any.erl renamed to gen/src/[email protected]

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
-module(any).
1+
-module(std@any).
22
-compile(no_auto_import).
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

66
list_module() ->
7-
list.
7+
std@list.
88

99
from(A) ->
1010
gleam__stdlib:identity(A).
@@ -34,10 +34,10 @@ list_any(A) ->
3434
gleam__stdlib:decode_list(A).
3535

3636
list(Any, Decode) ->
37-
result:then(list_any(Any),
38-
fun(Capture1) ->
39-
(list_module()):traverse(Capture1, Decode)
40-
end).
37+
std@result:then(list_any(Any),
38+
fun(Capture1) ->
39+
(list_module()):traverse(Capture1, Decode)
40+
end).
4141

4242
tuple(A) ->
4343
gleam__stdlib:decode_tuple(A).

gen/src/atom.erl renamed to gen/src/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(atom).
1+
-module(std@atom).
22
-compile(no_auto_import).
33

44
-export([from_string/1, create_from_string/1, to_string/1]).

gen/src/bool.erl renamed to gen/src/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(bool).
1+
-module(std@bool).
22
-compile(no_auto_import).
33

44
-export([negate/1, compare/2, max/2, min/2, to_int/1]).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(expect).
1+
-module(std@expect).
22
-compile(no_auto_import).
33

44
-export([equal/2, not_equal/2, true/1, false/1, is_ok/1, is_error/1, fail/0]).

gen/src/float.erl renamed to gen/src/[email protected]

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(float).
1+
-module(std@float).
22
-compile(no_auto_import).
33

44
-export([parse/1, to_string/1, ceiling/1, floor/1, round/1, truncate/1]).
@@ -7,7 +7,7 @@ parse(A) ->
77
gleam__stdlib:parse_float(A).
88

99
to_string(F) ->
10-
iodata:to_string(iodata:from_float(F)).
10+
std@iodata:to_string(std@iodata:from_float(F)).
1111

1212
ceiling(A) ->
1313
math:ceil(A).

gen/src/http.erl renamed to gen/src/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(http).
1+
-module(std@http).
22
-compile(no_auto_import).
33

44
-export([]).

gen/src/int.erl renamed to gen/src/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(int).
1+
-module(std@int).
22
-compile(no_auto_import).
33

44
-export([parse/1, to_string/1, to_base_string/2, compare/2]).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(iodata).
1+
-module(std@iodata).
22
-compile(no_auto_import).
33

44
-export([prepend/2, append/2, prepend_iodata/2, append_iodata/2, from_strings/1, concat/1, new/1, to_string/1, byte_size/1, from_float/1, lowercase/1, uppercase/1, reverse/1, split/2, replace/3, is_equal/2, is_empty/1]).

gen/src/list.erl renamed to gen/src/[email protected]

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(list).
1+
-module(std@list).
22
-compile(no_auto_import).
33

44
-export([length/1, reverse/1, is_empty/1, contains/2, head/1, tail/1, filter/2, map/2, index_map/2, traverse/2, drop/2, take/2, new/0, append/2, flatten/1, fold/3, fold_right/3, find/2, all/2, any/2, zip/2, strict_zip/2, intersperse/2, at/2, unique/1, sort/1, range/2, repeat/2, split/2, split_while/2]).
@@ -309,7 +309,7 @@ sort(List) ->
309309
end.
310310

311311
range(Start, Stop) ->
312-
case int:compare(Start, Stop) of
312+
case std@int:compare(Start, Stop) of
313313
eq ->
314314
[];
315315

0 commit comments

Comments
 (0)