diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/concurrency/frp.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/control/continuation.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/control/reader.lux | 2 | ||||
-rw-r--r-- | stdlib/test/test/lux/control/state.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/control/writer.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/coll/list.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/coll/sequence.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/error.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/identity.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/lazy.lux | 6 | ||||
-rw-r--r-- | stdlib/test/test/lux/data/maybe.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/io.lux | 2 |
12 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/test/test/lux/concurrency/frp.lux b/stdlib/test/test/lux/concurrency/frp.lux index 48af98a6f..e41f947fe 100644 --- a/stdlib/test/test/lux/concurrency/frp.lux +++ b/stdlib/test/test/lux/concurrency/frp.lux @@ -94,14 +94,14 @@ (do io.Monad<IO> [#let [>f< (: (Channel (-> Int Int)) (frp.channel [])) >a< (: (Channel Int) (frp.channel []))] - output (read! (let [(^open) frp.Applicative<Channel>] + output (read! (let [(^open) frp.Apply<Channel>] (apply >f< >a<))) _ (write! (list i/inc) >f<) _ (write! (list 12345) >a<)] (wrap output))) _ (promise.wait +100) output (promise.future (atom.read output))] - (assert "Applicative works over all channel values." + (assert "Apply works over all channel values." (list/= (list 12346) (list.reverse output))))) diff --git a/stdlib/test/test/lux/control/continuation.lux b/stdlib/test/test/lux/control/continuation.lux index ad50a5515..7f9ff00d9 100644 --- a/stdlib/test/test/lux/control/continuation.lux +++ b/stdlib/test/test/lux/control/continuation.lux @@ -15,7 +15,7 @@ (<| (times +100) (do @ [sample r.nat - #let [(^open "&/") &.Applicative<Cont> + #let [(^open "&/") &.Apply<Cont> (^open "&/") &.Monad<Cont>] elems (r.list +3 r.nat)] ($_ seq @@ -25,7 +25,7 @@ (test "Can use functor." (n/= (n/inc sample) (&.run (&/map n/inc (&/wrap sample))))) - (test "Can use applicative." + (test "Can use apply." (n/= (n/inc sample) (&.run (&/apply (&/wrap n/inc) (&/wrap sample))))) (test "Can use monad." diff --git a/stdlib/test/test/lux/control/reader.lux b/stdlib/test/test/lux/control/reader.lux index 4eab1d6f3..f84d8d16f 100644 --- a/stdlib/test/test/lux/control/reader.lux +++ b/stdlib/test/test/lux/control/reader.lux @@ -10,7 +10,7 @@ lux/test) (context: "Readers" - (let [(^open "&/") &.Applicative<Reader> + (let [(^open "&/") &.Apply<Reader> (^open "&/") &.Monad<Reader>] ($_ seq (test "" (i/= 123 (&.run 123 &.ask))) diff --git a/stdlib/test/test/lux/control/state.lux b/stdlib/test/test/lux/control/state.lux index 396b390e7..33a318a2f 100644 --- a/stdlib/test/test/lux/control/state.lux +++ b/stdlib/test/test/lux/control/state.lux @@ -52,13 +52,13 @@ [state r.nat value r.nat #let [(^open "&/") &.Functor<State> - (^open "&/") &.Applicative<State> + (^open "&/") &.Apply<State> (^open "&/") &.Monad<State>]] ($_ seq (test "Can use functor." (with-conditions [state (n/inc state)] (&/map n/inc &.get))) - (test "Can use applicative." + (test "Can use apply." (and (with-conditions [state value] (&/wrap value)) (with-conditions [state (n/+ value value)] diff --git a/stdlib/test/test/lux/control/writer.lux b/stdlib/test/test/lux/control/writer.lux index 6139db20e..09f37a957 100644 --- a/stdlib/test/test/lux/control/writer.lux +++ b/stdlib/test/test/lux/control/writer.lux @@ -11,12 +11,12 @@ (context: "Writer." (let [(^open "&/") (&.Monad<Writer> text.Monoid<Text>) - (^open "&/") (&.Applicative<Writer> text.Monoid<Text>)] + (^open "&/") (&.Apply<Writer> text.Monoid<Text>)] ($_ seq (test "Functor respects Writer." (i/= 11 (product.right (&/map i/inc ["" 10])))) - (test "Applicative respects Writer." + (test "Apply respects Writer." (and (i/= 20 (product.right (&/wrap 20))) (i/= 30 (product.right (&/apply (&/wrap (i/+ 10)) (&/wrap 20)))))) diff --git a/stdlib/test/test/lux/data/coll/list.lux b/stdlib/test/test/lux/data/coll/list.lux index f9e6e31b9..729519823 100644 --- a/stdlib/test/test/lux/data/coll/list.lux +++ b/stdlib/test/test/lux/data/coll/list.lux @@ -173,9 +173,9 @@ (and (= sample left) (= other-sample right)))))) - (test "Applicative allows you to create singleton lists, and apply lists of functions to lists of values." + (test "Apply allows you to create singleton lists, and apply lists of functions to lists of values." (let [(^open) &.Monad<List> - (^open) &.Applicative<List>] + (^open) &.Apply<List>] (and (= (list separator) (wrap separator)) (= (map n/inc sample) (apply (wrap n/inc) sample))))) diff --git a/stdlib/test/test/lux/data/coll/sequence.lux b/stdlib/test/test/lux/data/coll/sequence.lux index e64377f21..e1d561fb7 100644 --- a/stdlib/test/test/lux/data/coll/sequence.lux +++ b/stdlib/test/test/lux/data/coll/sequence.lux @@ -18,7 +18,7 @@ other-sample (r.sequence size r.nat) non-member (|> r.nat (r.filter (|>> (&.member? number.Eq<Nat> sample) not))) #let [(^open "&/") (&.Eq<Sequence> number.Eq<Nat>) - (^open "&/") &.Applicative<Sequence> + (^open "&/") &.Apply<Sequence> (^open "&/") &.Monad<Sequence> (^open "&/") &.Fold<Sequence> (^open "&/") &.Monoid<Sequence>]] @@ -63,7 +63,7 @@ (and (not (&/= sample there)) (&/= sample back-again)))) - (test "Applicative allows you to create singleton sequences, and apply sequences of functions to sequences of values." + (test "Apply allows you to create singleton sequences, and apply sequences of functions to sequences of values." (and (&/= (&.sequence non-member) (&/wrap non-member)) (&/= (&/map n/inc sample) (&/apply (&/wrap n/inc) sample)))) diff --git a/stdlib/test/test/lux/data/error.lux b/stdlib/test/test/lux/data/error.lux index 84556fde7..fb66bc7fe 100644 --- a/stdlib/test/test/lux/data/error.lux +++ b/stdlib/test/test/lux/data/error.lux @@ -8,7 +8,7 @@ lux/test) (context: "Errors" - (let [(^open "&/") &.Applicative<Error> + (let [(^open "&/") &.Apply<Error> (^open "&/") &.Monad<Error>] ($_ seq (test "Functor correctly handles both cases." @@ -21,7 +21,7 @@ (case> (#&.Error "YOLO") true _ false)) )) - (test "Applicative correctly handles both cases." + (test "Apply correctly handles both cases." (and (|> (&/wrap 20) (case> (#&.Success 20) true _ false)) (|> (&/apply (&/wrap i/inc) (&/wrap 10)) diff --git a/stdlib/test/test/lux/data/identity.lux b/stdlib/test/test/lux/data/identity.lux index 9e36efda5..f5ac9c6ba 100644 --- a/stdlib/test/test/lux/data/identity.lux +++ b/stdlib/test/test/lux/data/identity.lux @@ -8,14 +8,14 @@ lux/test) (context: "Identity" - (let [(^open "&/") &.Applicative<Identity> + (let [(^open "&/") &.Apply<Identity> (^open "&/") &.Monad<Identity> (^open "&/") &.CoMonad<Identity>] ($_ seq (test "Functor does not affect values." (Text/= "yololol" (&/map (Text/compose "yolo") "lol"))) - (test "Applicative does not affect values." + (test "Apply does not affect values." (and (Text/= "yolo" (&/wrap "yolo")) (Text/= "yololol" (&/apply (&/wrap (Text/compose "yolo")) (&/wrap "lol"))))) diff --git a/stdlib/test/test/lux/data/lazy.lux b/stdlib/test/test/lux/data/lazy.lux index b683abb0f..07513adec 100644 --- a/stdlib/test/test/lux/data/lazy.lux +++ b/stdlib/test/test/lux/data/lazy.lux @@ -24,7 +24,7 @@ (&.thaw lazy)))) )))) -(context: "Functor, Applicative, Monad." +(context: "Functor, Apply, Monad." (<| (times +100) (do @ [sample r.nat] @@ -43,9 +43,9 @@ &.thaw (n/= (n/inc sample)))) - (test "Applicative apply." + (test "Apply apply." (let [(^open "&/") &.Monad<Lazy> - (^open "&/") &.Applicative<Lazy>] + (^open "&/") &.Apply<Lazy>] (|> (&/apply (&/wrap n/inc) (&/wrap sample)) &.thaw (n/= (n/inc sample))))) diff --git a/stdlib/test/test/lux/data/maybe.lux b/stdlib/test/test/lux/data/maybe.lux index ca11da17f..9723500f5 100644 --- a/stdlib/test/test/lux/data/maybe.lux +++ b/stdlib/test/test/lux/data/maybe.lux @@ -10,7 +10,7 @@ (context: "Maybe" (let [(^open "&/") &.Monoid<Maybe> - (^open "&/") &.Applicative<Maybe> + (^open "&/") &.Apply<Maybe> (^open "&/") &.Monad<Maybe> (^open "Maybe/") (&.Eq<Maybe> text.Eq<Text>)] ($_ seq @@ -31,7 +31,7 @@ (and (Maybe/= #.None (&/map (text/compose "yolo") #.None)) (Maybe/= (#.Some "yololol") (&/map (text/compose "yolo") (#.Some "lol"))))) - (test "Applicative respects Maybe." + (test "Apply respects Maybe." (and (Maybe/= (#.Some "yolo") (&/wrap "yolo")) (Maybe/= (#.Some "yololol") (&/apply (&/wrap (text/compose "yolo")) (&/wrap "lol"))))) diff --git a/stdlib/test/test/lux/io.lux b/stdlib/test/test/lux/io.lux index 5836e5844..43841a708 100644 --- a/stdlib/test/test/lux/io.lux +++ b/stdlib/test/test/lux/io.lux @@ -12,7 +12,7 @@ (test "" (Text/= "YOLO" (&.run (&.io "YOLO")))) (test "" (i/= 11 (&.run (:: &.Functor<IO> map i/inc (&.io 10))))) (test "" (i/= 10 (&.run (:: &.Monad<IO> wrap 10)))) - (test "" (i/= 30 (&.run (let [(^open "&/") &.Applicative<IO> + (test "" (i/= 30 (&.run (let [(^open "&/") &.Apply<IO> (^open "&/") &.Monad<IO>] (&/apply (&/wrap (i/+ 10)) (&/wrap 20)))))) (test "" (i/= 30 (&.run (do &.Monad<IO> |