aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source')
-rw-r--r--stdlib/source/lux.lux4
-rw-r--r--stdlib/source/lux/compiler/default/phase/extension/analysis/host.jvm.lux2
-rw-r--r--stdlib/source/lux/control/thread.lux2
-rw-r--r--stdlib/source/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/lux/data/collection/bits.lux2
-rw-r--r--stdlib/source/lux/data/collection/dictionary.lux2
-rw-r--r--stdlib/source/lux/data/collection/row.lux2
-rw-r--r--stdlib/source/lux/data/format/json.lux2
-rw-r--r--stdlib/source/lux/data/number.lux2
-rw-r--r--stdlib/source/lux/host.jvm.lux6
-rw-r--r--stdlib/source/lux/macro/poly/equivalence.lux14
-rw-r--r--stdlib/source/lux/math/random.lux2
-rw-r--r--stdlib/source/lux/type.lux3
-rw-r--r--stdlib/source/lux/world/binary.lux4
-rw-r--r--stdlib/source/lux/world/file.lux2
15 files changed, 30 insertions, 25 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 1c7969f99..4f48518a1 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -5975,10 +5975,6 @@
(f value)
value)))
-(type: #export (Array a)
- {#.doc "Mutable arrays."}
- (#.Primitive "#Array" (#.Cons a #.Nil)))
-
(def: target
(Meta Text)
(function (_ compiler)
diff --git a/stdlib/source/lux/compiler/default/phase/extension/analysis/host.jvm.lux b/stdlib/source/lux/compiler/default/phase/extension/analysis/host.jvm.lux
index 2713f59a2..5ba07b362 100644
--- a/stdlib/source/lux/compiler/default/phase/extension/analysis/host.jvm.lux
+++ b/stdlib/source/lux/compiler/default/phase/extension/analysis/host.jvm.lux
@@ -13,7 +13,7 @@
format]
[collection
["." list ("list/." Fold<List> Functor<List> Monoid<List>)]
- ["." array]
+ ["." array (#+ Array)]
["." dictionary (#+ Dictionary)]]]
["." type
["." check]]
diff --git a/stdlib/source/lux/control/thread.lux b/stdlib/source/lux/control/thread.lux
index 2e7942355..f81877a2a 100644
--- a/stdlib/source/lux/control/thread.lux
+++ b/stdlib/source/lux/control/thread.lux
@@ -6,7 +6,7 @@
[monad (#+ Monad do)]]
[data
[collection
- ["." array]]]
+ ["." array (#+ Array)]]]
[type (#+ :share)
abstract]
[compiler
diff --git a/stdlib/source/lux/data/collection/array.lux b/stdlib/source/lux/data/collection/array.lux
index f19ad6547..6036d96ae 100644
--- a/stdlib/source/lux/data/collection/array.lux
+++ b/stdlib/source/lux/data/collection/array.lux
@@ -13,6 +13,12 @@
[compiler
["." host]]])
+(def: #export array-type-name "#Array")
+
+(type: #export (Array a)
+ {#.doc "Mutable arrays."}
+ (#.Primitive array-type-name (#.Cons a #.Nil)))
+
(def: #export (new size)
(All [a] (-> Nat (Array a)))
(`` (for {(~~ (static host.jvm))
diff --git a/stdlib/source/lux/data/collection/bits.lux b/stdlib/source/lux/data/collection/bits.lux
index 66cb2dab7..8855c0593 100644
--- a/stdlib/source/lux/data/collection/bits.lux
+++ b/stdlib/source/lux/data/collection/bits.lux
@@ -10,7 +10,7 @@
[text
format]
[collection
- ["." array ("array/." Fold<Array>)]]]])
+ ["." array (#+ Array) ("array/." Fold<Array>)]]]])
(type: #export Chunk I64)
diff --git a/stdlib/source/lux/data/collection/dictionary.lux b/stdlib/source/lux/data/collection/dictionary.lux
index f48554f55..e61d657a5 100644
--- a/stdlib/source/lux/data/collection/dictionary.lux
+++ b/stdlib/source/lux/data/collection/dictionary.lux
@@ -10,7 +10,7 @@
["." i64]]
[collection
["." list ("list/." Fold<List> Functor<List> Monoid<List>)]
- ["." array ("array/." Functor<Array> Fold<Array>)]]]
+ ["." array (#+ Array) ("array/." Functor<Array> Fold<Array>)]]]
])
## This implementation of Hash Array Mapped Trie (HAMT) is based on
diff --git a/stdlib/source/lux/data/collection/row.lux b/stdlib/source/lux/data/collection/row.lux
index 3951aadd1..668e49b6c 100644
--- a/stdlib/source/lux/data/collection/row.lux
+++ b/stdlib/source/lux/data/collection/row.lux
@@ -16,7 +16,7 @@
["." i64]]
[collection
["." list ("list/." Fold<List> Functor<List> Monoid<List>)]
- ["." array ("array/." Functor<Array> Fold<Array>)]]]
+ ["." array (#+ Array) ("array/." Functor<Array> Fold<Array>)]]]
[macro (#+ with-gensyms)
["." code]
["s" syntax (#+ syntax: Syntax)]]])
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 549631f2a..3594ef28c 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -1,7 +1,7 @@
(.module: {#.doc "Functionality for reading and writing values in the JSON format.
For more information, please see: http://www.json.org/"}
- [lux (#- Array)
+ [lux #*
[control
["." monad (#+ do Monad)]
[equivalence (#+ Equivalence)]
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index 2fc52ae41..a1303f848 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -14,7 +14,7 @@
["." maybe]
["." text]
[collection
- ["." array]]]
+ ["." array (#+ Array)]]]
["." math]]
[/
["." i64]])
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 98cf40bfc..e7d28dd04 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -13,6 +13,7 @@
["." text ("text/." Equivalence<Text> Monoid<Text>)
format]
[collection
+ ["." array (#+ Array)]
["." list ("list/." Monad<List> Fold<List> Monoid<List>)]]]
function
["." type ("type/." Equivalence<Type>)]
@@ -63,7 +64,6 @@
)
## [Utils]
-(def: array-type-name "#Array")
(def: constructor-method-name "<init>")
(def: member-separator "::")
@@ -315,7 +315,7 @@
(#GenericArray param)
(let [=param (class->type' mode type-params #1 param)]
- (` (.Array (~ =param))))
+ (` ((~! array.Array) (~ =param))))
(^or (#GenericWildcard #.None) (#GenericWildcard (#.Some [#LowerBound _])))
(' (.Ex [*] *))
@@ -1105,7 +1105,7 @@
(format "(" (sanitize name) " " (spaced (list/map generic-type$ params)) ")")
(#GenericArray param)
- (format "(" array-type-name " " (generic-type$ param) ")")
+ (format "(" array.array-type-name " " (generic-type$ param) ")")
(#GenericWildcard #.None)
"?"
diff --git a/stdlib/source/lux/macro/poly/equivalence.lux b/stdlib/source/lux/macro/poly/equivalence.lux
index 672817ee6..edb1f8dfc 100644
--- a/stdlib/source/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/lux/macro/poly/equivalence.lux
@@ -64,13 +64,13 @@
(wrap (` (: (~ (@Equivalence inputT))
(<eq> (~ argC))))))]
- [.Maybe maybe.Equivalence<Maybe>]
- [.List list.Equivalence<List>]
- [row.Row row.Equivalence<Row>]
- [.Array array.Equivalence<Array>]
- [queue.Queue queue.Equivalence<Queue>]
- [set.Set set.Equivalence<Set>]
- [rose.Tree rose.Equivalence<Tree>]
+ [.Maybe maybe.Equivalence<Maybe>]
+ [.List list.Equivalence<List>]
+ [row.Row row.Equivalence<Row>]
+ [array.Array array.Equivalence<Array>]
+ [queue.Queue queue.Equivalence<Queue>]
+ [set.Set set.Equivalence<Set>]
+ [rose.Tree rose.Equivalence<Tree>]
))
(do @
[[_ _ valC] (poly.apply ($_ p.and
diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux
index f743b2d35..eab1ae04c 100644
--- a/stdlib/source/lux/math/random.lux
+++ b/stdlib/source/lux/math/random.lux
@@ -16,7 +16,7 @@
["." unicode (#+ Char Segment)]]
[collection
["." list ("list/." Fold<List>)]
- ["." array]
+ ["." array (#+ Array)]
["." dictionary (#+ Dictionary)]
["." queue (#+ Queue)]
["." set (#+ Set)]
diff --git a/stdlib/source/lux/type.lux b/stdlib/source/lux/type.lux
index 5dd1e905f..be3b54eed 100644
--- a/stdlib/source/lux/type.lux
+++ b/stdlib/source/lux/type.lux
@@ -10,6 +10,7 @@
[number ("nat/." Codec<Text,Nat>)]
["." maybe]
[collection
+ ["." array]
["." list ("list/." Functor<List> Monoid<List> Fold<List>)]]]
["." macro
["." code]
@@ -334,7 +335,7 @@
(-> Nat Type Type)
(case level
0 elem-type
- _ (|> elem-type (array (dec level)) (list) (#.Primitive "#Array"))))
+ _ (|> elem-type (array (dec level)) (list) (#.Primitive array.array-type-name))))
(syntax: #export (:log! {input (p.or s.identifier
s.any)})
diff --git a/stdlib/source/lux/world/binary.lux b/stdlib/source/lux/world/binary.lux
index a125b8067..1821c61b9 100644
--- a/stdlib/source/lux/world/binary.lux
+++ b/stdlib/source/lux/world/binary.lux
@@ -10,7 +10,9 @@
[number
["." i64]]
[text
- format]]
+ format]
+ [collection
+ [array (#+ Array)]]]
["." host (#+ import:)]])
(exception: #export (index-out-of-bounds {description Text})
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux
index 50d9ec2bc..912c448e9 100644
--- a/stdlib/source/lux/world/file.lux
+++ b/stdlib/source/lux/world/file.lux
@@ -9,7 +9,7 @@
[text
format]
[collection
- ["." array]]]
+ ["." array (#+ Array)]]]
[time
["." instant (#+ Instant)]
["." duration]]