aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/thread.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/thread.lux')
-rw-r--r--stdlib/source/library/lux/control/thread.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux
index b528d22aa..8b6323863 100644
--- a/stdlib/source/library/lux/control/thread.lux
+++ b/stdlib/source/library/lux/control/thread.lux
@@ -14,16 +14,16 @@
[type
abstract]]])
-(type: #export (Thread ! a)
+(type: .public (Thread ! a)
{#.doc (doc "An imperative process with access to mutable values.")}
(-> ! a))
-(abstract: #export (Box t v)
- (Array v)
-
+(abstract: .public (Box t v)
{#.doc "A mutable box holding a value."}
- (def: #export (box init)
+ (Array v)
+
+ (def: .public (box init)
{#.doc (doc "A brand-new box initialized to the given value.")}
(All [a] (-> a (All [!] (Thread ! (Box ! a)))))
(function (_ !)
@@ -31,7 +31,7 @@
(array.write! 0 init)
:abstraction)))
- (def: #export (read box)
+ (def: .public (read box)
{#.doc (doc "Reads the current value in the box.")}
(All [! a] (-> (Box ! a) (Thread ! a)))
(function (_ !)
@@ -53,28 +53,28 @@
@.php ("php array read" 0 (:representation box))
@.scheme ("scheme array read" 0 (:representation box))})))
- (def: #export (write value box)
+ (def: .public (write value box)
{#.doc (doc "Mutates the value in the box.")}
(All [a] (-> a (All [!] (-> (Box ! a) (Thread ! Any)))))
(function (_ !)
(|> box :representation (array.write! 0 value) :abstraction)))
)
-(def: #export (run thread)
+(def: .public (run thread)
{#.doc (doc "Executes the imperative thread in a self-contained way.")}
(All [a]
(-> (All [!] (Thread ! a))
a))
(thread []))
-(def: #export io
+(def: .public io
{#.doc (doc "Transforms the imperative thread into an I/O computation.")}
(All [a]
(-> (All [!] (Thread ! a))
(IO a)))
(|>> ..run io.io))
-(implementation: #export functor
+(implementation: .public functor
(All [!] (Functor (Thread !)))
(def: (map f)
@@ -82,7 +82,7 @@
(function (_ !)
(f (fa !))))))
-(implementation: #export apply
+(implementation: .public apply
(All [!] (Apply (Thread !)))
(def: &functor ..functor)
@@ -91,7 +91,7 @@
(function (_ !)
((ff !) (fa !)))))
-(implementation: #export monad
+(implementation: .public monad
(All [!] (Monad (Thread !)))
(def: &functor ..functor)
@@ -104,7 +104,7 @@
(function (_ !)
((ffa !) !))))
-(def: #export (update f box)
+(def: .public (update f box)
{#.doc (doc "Update a box's value by applying a function to it.")}
(All [a !] (-> (-> a a) (Box ! a) (Thread ! a)))
(do ..monad