aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/continuation.lux (renamed from stdlib/source/lux/control/cont.lux)0
-rw-r--r--stdlib/source/lux/data/coll/stream.lux20
-rw-r--r--stdlib/test/test/lux/control/continuation.lux (renamed from stdlib/test/test/lux/control/cont.lux)2
-rw-r--r--stdlib/test/test/lux/data/coll/stream.lux3
-rw-r--r--stdlib/test/tests.lux2
5 files changed, 13 insertions, 14 deletions
diff --git a/stdlib/source/lux/control/cont.lux b/stdlib/source/lux/control/continuation.lux
index 35f549ee7..35f549ee7 100644
--- a/stdlib/source/lux/control/cont.lux
+++ b/stdlib/source/lux/control/continuation.lux
diff --git a/stdlib/source/lux/data/coll/stream.lux b/stdlib/source/lux/data/coll/stream.lux
index 3e76e9d5c..b6964d95f 100644
--- a/stdlib/source/lux/data/coll/stream.lux
+++ b/stdlib/source/lux/data/coll/stream.lux
@@ -3,7 +3,7 @@
(lux (control functor
monad
comonad
- [cont #+ pending Cont]
+ [continuation #+ pending Cont]
["p" parser])
[macro #+ with-gensyms]
(macro [code]
@@ -50,7 +50,7 @@
(do-template [<name> <return> <part>]
[(def: #export (<name> s)
(All [a] (-> (Stream a) <return>))
- (let [[h t] (cont.run s)]
+ (let [[h t] (continuation.run s)]
<part>))]
[head a h]
@@ -58,7 +58,7 @@
(def: #export (nth idx s)
(All [a] (-> Nat (Stream a) a))
- (let [[h t] (cont.run s)]
+ (let [[h t] (continuation.run s)]
(if (n/> +0 idx)
(nth (n/dec idx) t)
h)))
@@ -67,7 +67,7 @@
[(def: #export (<taker> pred xs)
(All [a]
(-> <pred-type> (Stream a) (List a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(list& x (<taker> <pred-step> xs'))
(list))))
@@ -75,7 +75,7 @@
(def: #export (<dropper> pred xs)
(All [a]
(-> <pred-type> (Stream a) (Stream a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(<dropper> <pred-step> xs')
xs)))
@@ -83,7 +83,7 @@
(def: #export (<splitter> pred xs)
(All [a]
(-> <pred-type> (Stream a) [(List a) (Stream a)]))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(let [[tail next] (<splitter> <pred-step> xs')]
[(#.Cons [x tail]) next])
@@ -102,7 +102,7 @@
(def: #export (filter p xs)
(All [a] (-> (-> a Bool) (Stream a) (Stream a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if (p x)
(pending [x (filter p xs')])
(filter p xs'))))
@@ -119,14 +119,14 @@
## [Structures]
(struct: #export _ (Functor Stream)
(def: (map f fa)
- (let [[h t] (cont.run fa)]
+ (let [[h t] (continuation.run fa)]
(pending [(f h) (map f t)]))))
(struct: #export _ (CoMonad Stream)
(def: functor Functor<Stream>)
(def: unwrap head)
(def: (split wa)
- (let [[head tail] (cont.run wa)]
+ (let [[head tail] (continuation.run wa)]
(pending [wa (split tail)]))))
## [Pattern-matching]
@@ -138,7 +138,7 @@
(with-gensyms [g!stream]
(let [body+ (` (let [(~+ (List/join (List/map (function (_ pattern)
(list (` [(~ pattern) (~ g!stream)])
- (` ((~! cont.run) (~ g!stream)))))
+ (` ((~! continuation.run) (~ g!stream)))))
patterns)))]
(~ body)))]
(wrap (list& g!stream body+ branches)))))
diff --git a/stdlib/test/test/lux/control/cont.lux b/stdlib/test/test/lux/control/continuation.lux
index 7afc84fc2..db274189e 100644
--- a/stdlib/test/test/lux/control/cont.lux
+++ b/stdlib/test/test/lux/control/continuation.lux
@@ -2,7 +2,7 @@
lux
(lux [io]
(control ["M" monad #+ do Monad]
- ["&" cont])
+ ["&" continuation])
(data [text "Text/" Monoid<Text>]
text/format
[number]
diff --git a/stdlib/test/test/lux/data/coll/stream.lux b/stdlib/test/test/lux/data/coll/stream.lux
index 1fe325782..cbdfcab49 100644
--- a/stdlib/test/test/lux/data/coll/stream.lux
+++ b/stdlib/test/test/lux/data/coll/stream.lux
@@ -2,8 +2,7 @@
lux
(lux [io]
(control [monad #+ do Monad]
- comonad
- [cont])
+ comonad)
(data [maybe]
[text "Text/" Monoid<Text>]
text/format
diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux
index 850abc865..05118f921 100644
--- a/stdlib/test/tests.lux
+++ b/stdlib/test/tests.lux
@@ -18,7 +18,7 @@
(control ["_." exception]
["_." interval]
["_." pipe]
- ["_." cont]
+ ["_." continuation]
["_." reader]
["_." writer]
["_." state]