diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-05-29 21:02:55 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-06-02 21:12:59 +0100 |
commit | 5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31 (patch) | |
tree | 5d0d281c66cf71c6e3ca880e6621138a71b95e7b /src | |
parent | ee03f5a0465e176e220060164a5ffc408f73ed0d (diff) | |
download | gleam_stdlib-5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31.tar.gz gleam_stdlib-5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31.zip |
Enable namespaced modules
Diffstat (limited to 'src')
-rw-r--r-- | src/std/any.gleam (renamed from src/any.gleam) | 6 | ||||
-rw-r--r-- | src/std/atom.gleam (renamed from src/atom.gleam) | 0 | ||||
-rw-r--r-- | src/std/bool.gleam (renamed from src/bool.gleam) | 2 | ||||
-rw-r--r-- | src/std/expect.gleam (renamed from src/expect.gleam) | 0 | ||||
-rw-r--r-- | src/std/float.gleam (renamed from src/float.gleam) | 2 | ||||
-rw-r--r-- | src/std/http.gleam (renamed from src/http.gleam) | 0 | ||||
-rw-r--r-- | src/std/int.gleam (renamed from src/int.gleam) | 2 | ||||
-rw-r--r-- | src/std/iodata.gleam (renamed from src/iodata.gleam) | 0 | ||||
-rw-r--r-- | src/std/list.gleam (renamed from src/list.gleam) | 6 | ||||
-rw-r--r-- | src/std/map_dict.gleam (renamed from src/map_dict.gleam) | 6 | ||||
-rw-r--r-- | src/std/order.gleam (renamed from src/order.gleam) | 0 | ||||
-rw-r--r-- | src/std/result.gleam (renamed from src/result.gleam) | 0 | ||||
-rw-r--r-- | src/std/string.gleam (renamed from src/str.gleam) | 7 | ||||
-rw-r--r-- | src/std/tuple.gleam (renamed from src/tuple.gleam) | 2 |
14 files changed, 15 insertions, 18 deletions
diff --git a/src/any.gleam b/src/std/any.gleam index a4ef0d4..c5c4a62 100644 --- a/src/any.gleam +++ b/src/std/any.gleam @@ -1,6 +1,6 @@ -import list -import atom -import result +import std/list +import std/atom +import std/result fn list_module() { list diff --git a/src/atom.gleam b/src/std/atom.gleam index 67d040d..67d040d 100644 --- a/src/atom.gleam +++ b/src/std/atom.gleam diff --git a/src/bool.gleam b/src/std/bool.gleam index f954897..985f0d6 100644 --- a/src/bool.gleam +++ b/src/std/bool.gleam @@ -1,4 +1,4 @@ -import order +import std/order pub fn negate(bool) { case bool { diff --git a/src/expect.gleam b/src/std/expect.gleam index 5ea6a93..5ea6a93 100644 --- a/src/expect.gleam +++ b/src/std/expect.gleam diff --git a/src/float.gleam b/src/std/float.gleam index 5840606..8e1904e 100644 --- a/src/float.gleam +++ b/src/std/float.gleam @@ -1,4 +1,4 @@ -import iodata +import std/iodata pub enum NotAFloat = | NotAFloat diff --git a/src/http.gleam b/src/std/http.gleam index d9942a8..d9942a8 100644 --- a/src/http.gleam +++ b/src/std/http.gleam diff --git a/src/int.gleam b/src/std/int.gleam index 5eeece4..b1f8256 100644 --- a/src/int.gleam +++ b/src/std/int.gleam @@ -1,4 +1,4 @@ -import order +import std/order pub enum NotAnInt = | NotAnInt diff --git a/src/iodata.gleam b/src/std/iodata.gleam index 56efc65..56efc65 100644 --- a/src/iodata.gleam +++ b/src/std/iodata.gleam diff --git a/src/list.gleam b/src/std/list.gleam index 58f36de..68dcb4a 100644 --- a/src/list.gleam +++ b/src/std/list.gleam @@ -1,5 +1,5 @@ -import int -import order +import std/int +import std/order pub enum Empty = | Empty @@ -293,7 +293,7 @@ pub fn split(list, n) { fn do_split_while(list, f, acc) { case list { | [] -> {reverse(acc), []} - | [x | xs] -> + | [x | xs] -> case f(x) { | False -> {reverse(acc), list} | _ -> do_split_while(xs, f, [x | acc]) diff --git a/src/map_dict.gleam b/src/std/map_dict.gleam index 2ec141a..32065f5 100644 --- a/src/map_dict.gleam +++ b/src/std/map_dict.gleam @@ -1,6 +1,6 @@ -import any -import result -import list +import std/any +import std/result +import std/list pub external type MapDict(key, value); diff --git a/src/order.gleam b/src/std/order.gleam index 4d39705..4d39705 100644 --- a/src/order.gleam +++ b/src/std/order.gleam diff --git a/src/result.gleam b/src/std/result.gleam index 133d9d5..133d9d5 100644 --- a/src/result.gleam +++ b/src/std/result.gleam diff --git a/src/str.gleam b/src/std/string.gleam index 9a6c3f3..9eacb37 100644 --- a/src/str.gleam +++ b/src/std/string.gleam @@ -1,8 +1,5 @@ -// Named str to avoid name collisions with the Erlang string module. -// Will rename later once we have namespaces for modules. - -import iodata -import list +import std/iodata +import std/list pub external fn length(String) -> Int = "string" "length" diff --git a/src/tuple.gleam b/src/std/tuple.gleam index 41902db..ab38a74 100644 --- a/src/tuple.gleam +++ b/src/std/tuple.gleam @@ -1,4 +1,4 @@ -import list +import std/list pub fn new(a, b) { {a, b} |