aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/concurrency/actor.lux43
-rw-r--r--stdlib/source/lux/concurrency/atom.lux6
-rw-r--r--stdlib/source/lux/concurrency/frp.lux20
-rw-r--r--stdlib/source/lux/concurrency/promise.lux19
-rw-r--r--stdlib/source/lux/concurrency/semaphore.lux16
-rw-r--r--stdlib/source/lux/concurrency/stm.lux27
-rw-r--r--stdlib/source/lux/concurrency/task.lux20
7 files changed, 82 insertions, 69 deletions
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index 792b65dfc..81e873def 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -1,23 +1,28 @@
(.module: {#.doc "The actor model of concurrency."}
- lux
- (lux (control monad
- ["p" parser]
- ["ex" exception (#+ exception:)])
- [io (#- run) ("io/" Monad<IO>)]
- (data [product]
- ["e" error]
- text/format
- (collection [list ("list/" Monoid<List> Monad<List> Fold<List>)]))
- [macro (#+ with-gensyms Monad<Meta>)]
- (macro [code]
- ["s" syntax (#+ syntax: Syntax)]
- (syntax ["cs" common]
- (common ["csr" reader]
- ["csw" writer])))
- (type abstract))
- (// [atom (#+ Atom atom)]
- [promise (#+ Promise promise) ("promise/" Monad<Promise>)]
- [task (#+ Task)]))
+ [lux #*
+ [control monad
+ ["p" parser]
+ ["ex" exception (#+ exception:)]]
+ [io (#- run) ("io/" Monad<IO>)]
+ [data
+ [product]
+ ["e" error]
+ text/format
+ [collection [list ("list/" Monoid<List> Monad<List> Fold<List>)]]]
+ [macro (#+ with-gensyms Monad<Meta>)
+ [code]
+ ["s" syntax (#+ syntax: Syntax)]
+ [syntax
+ ["cs" common]
+ [common
+ ["csr" reader]
+ ["csw" writer]]]]
+ [type
+ abstract]]
+ [//
+ [atom (#+ Atom atom)]
+ [promise (#+ Promise promise) ("promise/" Monad<Promise>)]
+ [task (#+ Task)]])
(exception: #export poisoned)
diff --git a/stdlib/source/lux/concurrency/atom.lux b/stdlib/source/lux/concurrency/atom.lux
index 49e16340f..8cfc117e4 100644
--- a/stdlib/source/lux/concurrency/atom.lux
+++ b/stdlib/source/lux/concurrency/atom.lux
@@ -1,7 +1,7 @@
(.module:
- lux
- (lux [function]
- [io (#- run)]))
+ [lux #*
+ [function]
+ [io (#- run)]])
(type: #export (Atom a)
{#.doc "Atomic references that are safe to mutate concurrently."}
diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux
index 0ecaf9266..b75e85939 100644
--- a/stdlib/source/lux/concurrency/frp.lux
+++ b/stdlib/source/lux/concurrency/frp.lux
@@ -1,13 +1,15 @@
(.module:
- lux
- (lux (control [functor (#+ Functor)]
- [apply (#+ Apply)]
- [monad (#+ do Monad)])
- [io (#+ IO io)]
- (data (collection [list ("list/" Monoid<List>)]))
- (type abstract))
- (// [atom (#+ Atom atom)]
- [promise (#+ Promise)]))
+ [lux #*
+ [control
+ [functor (#+ Functor)]
+ [apply (#+ Apply)]
+ [monad (#+ do Monad)]]
+ [io (#+ IO io)]
+ [data [collection [list ("list/" Monoid<List>)]]]
+ [type abstract]]
+ [//
+ [atom (#+ Atom atom)]
+ [promise (#+ Promise)]])
## [Types]
(abstract: #export (Channel a)
diff --git a/stdlib/source/lux/concurrency/promise.lux b/stdlib/source/lux/concurrency/promise.lux
index aa0473dc9..c76c4c013 100644
--- a/stdlib/source/lux/concurrency/promise.lux
+++ b/stdlib/source/lux/concurrency/promise.lux
@@ -1,13 +1,14 @@
(.module:
- lux
- (lux [io (#+ IO io)]
- [function]
- (control [functor (#+ Functor)]
- [apply (#+ Apply)]
- [monad (#+ do Monad)])
- (data [product])
- (concurrency [atom (#+ Atom atom)])
- (type abstract)))
+ [lux #*
+ [io (#+ IO io)]
+ [function]
+ [control
+ [functor (#+ Functor)]
+ [apply (#+ Apply)]
+ [monad (#+ do Monad)]]
+ [data [product]]
+ [concurrency [atom (#+ Atom atom)]]
+ [type abstract]])
(def: #export parallelism
Nat
diff --git a/stdlib/source/lux/concurrency/semaphore.lux b/stdlib/source/lux/concurrency/semaphore.lux
index b237caa2b..0c01e9389 100644
--- a/stdlib/source/lux/concurrency/semaphore.lux
+++ b/stdlib/source/lux/concurrency/semaphore.lux
@@ -1,11 +1,13 @@
(.module:
- lux
- (lux (control [monad (#+ do)])
- (concurrency [atom (#+ Atom)]
- [promise (#+ Promise)])
- [io (#+ IO)]
- (type abstract
- [refinement])))
+ [lux #*
+ [control [monad (#+ do)]]
+ [concurrency
+ [atom (#+ Atom)]
+ [promise (#+ Promise)]]
+ [io (#+ IO)]
+ [type
+ abstract
+ [refinement]]])
(type: State
{#open-positions Nat
diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux
index 1478c55e3..e3c797b2d 100644
--- a/stdlib/source/lux/concurrency/stm.lux
+++ b/stdlib/source/lux/concurrency/stm.lux
@@ -1,16 +1,19 @@
(.module:
- lux
- (lux (control [functor (#+ Functor)]
- [apply (#+ Apply)]
- [monad (#+ do Monad)])
- [io (#+ IO io)]
- (data [product]
- [maybe]
- (collection [list ("list/" Functor<List> Fold<List>)]))
- (concurrency [atom (#+ Atom atom)]
- [promise (#+ Promise promise)]
- [frp ("frp/" Functor<Channel>)])
- (type abstract)))
+ [lux #*
+ [control
+ [functor (#+ Functor)]
+ [apply (#+ Apply)]
+ [monad (#+ do Monad)]]
+ [io (#+ IO io)]
+ [data
+ [product]
+ [maybe]
+ [collection [list ("list/" Functor<List> Fold<List>)]]]
+ [concurrency
+ [atom (#+ Atom atom)]
+ [promise (#+ Promise promise)]
+ [frp ("frp/" Functor<Channel>)]]
+ [type abstract]])
(abstract: #export (Var a)
{#.doc "A mutable cell containing a value, and observers that will be alerted of any change to it."}
diff --git a/stdlib/source/lux/concurrency/task.lux b/stdlib/source/lux/concurrency/task.lux
index 3b3b6793c..f3043ce9b 100644
--- a/stdlib/source/lux/concurrency/task.lux
+++ b/stdlib/source/lux/concurrency/task.lux
@@ -1,14 +1,14 @@
(.module:
- lux
- (lux (data ["E" error])
- (control ["F" functor]
- ["A" apply]
- monad
- ["ex" exception (#+ Exception)])
- (concurrency ["P" promise])
- [macro]
- (macro ["s" syntax (#+ syntax: Syntax)])
- ))
+ [lux #*
+ [data ["E" error]]
+ [control
+ ["F" functor]
+ ["A" apply]
+ monad
+ ["ex" exception (#+ Exception)]]
+ [concurrency ["P" promise]]
+ ["." macro ["s" syntax (#+ syntax: Syntax)]]
+ ])
(type: #export (Task a)
(P.Promise (E.Error a)))