aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/io.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/io.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux
index b3d5893bd..843170c4c 100644
--- a/stdlib/source/library/lux/control/io.lux
+++ b/stdlib/source/library/lux/control/io.lux
@@ -15,25 +15,25 @@
[syntax (#+ syntax:)]
["." template]]]])
-(abstract: #export (IO a)
- (-> Any a)
-
+(abstract: .public (IO a)
{#.doc "A type that represents synchronous, effectful computations that may interact with the outside world."}
+ (-> Any a)
+
(def: label
(All [a] (-> (-> Any a) (IO a)))
(|>> :abstraction))
(template: (!io computation)
- (:abstraction (template.with_locals [g!func g!arg]
- (function (g!func g!arg)
- computation))))
+ [(:abstraction (template.with_locals [g!func g!arg]
+ (function (g!func g!arg)
+ computation)))])
(template: (!run io)
## creatio ex nihilo
- ((:representation io) []))
+ [((:representation io) [])])
- (syntax: #export (io computation)
+ (syntax: .public (io computation)
{#.doc (doc "Delays the evaluation of an expression, by wrapping it in an IO 'thunk'."
"Great for wrapping effectful computations (which will not be performed until the IO is 'run')."
(io (exec
@@ -43,18 +43,18 @@
(in (list (` ((~! ..label) (function ((~ g!func) (~ g!arg))
(~ computation))))))))
- (def: #export run
+ (def: .public run
{#.doc "A way to execute IO computations and perform their side-effects."}
(All [a] (-> (IO a) a))
(|>> !run))
- (implementation: #export functor
+ (implementation: .public functor
(Functor IO)
(def: (map f)
(|>> !run f !io)))
- (implementation: #export apply
+ (implementation: .public apply
(Apply IO)
(def: &functor ..functor)
@@ -62,7 +62,7 @@
(def: (apply ff fa)
(!io ((!run ff) (!run fa)))))
- (implementation: #export monad
+ (implementation: .public monad
(Monad IO)
(def: &functor ..functor)