aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency/task.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-29 04:51:04 -0400
committerEduardo Julian2017-11-29 04:51:04 -0400
commit8c5cca122817bc63f4f84cc8351ced3cb67e5eea (patch)
tree8803dd3ed59ddcc6b964354fd312ab9e62e12cd8 /stdlib/source/lux/concurrency/task.lux
parent1ef969c8ce0f1a83ffa8d26d779806190ac3eced (diff)
- Changed the identifier separator, from the semi-colon (;) to the period/dot (.).
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/concurrency/task.lux50
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/lux/concurrency/task.lux b/stdlib/source/lux/concurrency/task.lux
index b65d7c563..7f1322bf4 100644
--- a/stdlib/source/lux/concurrency/task.lux
+++ b/stdlib/source/lux/concurrency/task.lux
@@ -1,4 +1,4 @@
-(;module:
+(.module:
lux
(lux (data ["E" error])
(control ["F" functor]
@@ -11,11 +11,11 @@
))
(type: #export (Task a)
- (P;Promise (E;Error a)))
+ (P.Promise (E.Error a)))
(def: #export (fail error)
(All [a] (-> Text (Task a)))
- (:: P;Applicative<Promise> wrap (#E;Error error)))
+ (:: P.Applicative<Promise> wrap (#E.Error error)))
(def: #export (throw exception message)
(All [a] (-> Exception Text (Task a)))
@@ -23,34 +23,34 @@
(def: #export (return value)
(All [a] (-> a (Task a)))
- (:: P;Applicative<Promise> wrap (#E;Success value)))
+ (:: P.Applicative<Promise> wrap (#E.Success value)))
(def: #export (try computation)
- (All [a] (-> (Task a) (Task (E;Error a))))
- (:: P;Functor<Promise> map (|>> #E;Success) computation))
+ (All [a] (-> (Task a) (Task (E.Error a))))
+ (:: P.Functor<Promise> map (|>> #E.Success) computation))
-(struct: #export _ (F;Functor Task)
+(struct: #export _ (F.Functor Task)
(def: (map f fa)
- (:: P;Functor<Promise> map
+ (:: P.Functor<Promise> map
(function [fa']
(case fa'
- (#E;Error error)
- (#E;Error error)
+ (#E.Error error)
+ (#E.Error error)
- (#E;Success a)
- (#E;Success (f a))))
+ (#E.Success a)
+ (#E.Success (f a))))
fa)))
-(struct: #export _ (A;Applicative Task)
+(struct: #export _ (A.Applicative Task)
(def: functor Functor<Task>)
(def: wrap return)
(def: (apply ff fa)
- (do P;Monad<Promise>
+ (do P.Monad<Promise>
[ff' ff
fa' fa]
- (wrap (do E;Monad<Error>
+ (wrap (do E.Monad<Error>
[f ff'
a fa']
(wrap (f a)))))))
@@ -59,21 +59,21 @@
(def: applicative Applicative<Task>)
(def: (join mma)
- (do P;Monad<Promise>
+ (do P.Monad<Promise>
[mma' mma]
(case mma'
- (#E;Error error)
- (wrap (#E;Error error))
+ (#E.Error error)
+ (wrap (#E.Error error))
- (#E;Success ma)
+ (#E.Success ma)
ma))))
-(syntax: #export (task [type s;any])
- {#;doc (doc "Makes an uninitialized Task (in this example, of Unit)."
+(syntax: #export (task [type s.any])
+ {#.doc (doc "Makes an uninitialized Task (in this example, of Unit)."
(task Unit))}
- (wrap (list (` (: (;;Task (~ type))
- (P;promise' #;None))))))
+ (wrap (list (` (: (..Task (~ type))
+ (P.promise' #.None))))))
(def: #export (from-promise promise)
- (All [a] (-> (P;Promise a) (Task a)))
- (:: P;Functor<Promise> map (|>> #E;Success) promise))
+ (All [a] (-> (P.Promise a) (Task a)))
+ (:: P.Functor<Promise> map (|>> #E.Success) promise))