diff options
author | Eduardo Julian | 2017-09-04 20:01:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-09-04 20:01:01 -0400 |
commit | 8e6c5fc029178674275758f7c68425b13a473208 (patch) | |
tree | 0d58e793998f900f3387e6d5e2216e91e7f13139 /stdlib/test | |
parent | 970e950aeb08179972d9e3460af3003771fc8511 (diff) |
- Renamed "Log" to "Writer".
Diffstat (limited to 'stdlib/test')
-rw-r--r-- | stdlib/test/test/lux/control/writer.lux (renamed from stdlib/test/test/lux/data/log.lux) | 22 | ||||
-rw-r--r-- | stdlib/test/tests.lux | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/test/test/lux/data/log.lux b/stdlib/test/test/lux/control/writer.lux index bcd3a1a56..8c9e1c676 100644 --- a/stdlib/test/test/lux/data/log.lux +++ b/stdlib/test/test/lux/control/writer.lux @@ -2,25 +2,25 @@ lux (lux [io] (control ["M" monad #+ do Monad] - pipe) - (data ["&" log] - [text "Text/" Monoid<Text> Eq<Text>] + pipe + ["&" writer]) + (data [text "Text/" Monoid<Text> Eq<Text>] [number] [product])) lux/test) -(context: "Logs" - (let [(^open "&/") (&;Monad<Log> text;Monoid<Text>)] +(context: "Writer." + (let [(^open "&/") (&;Monad<Writer> text;Monoid<Text>)] ($_ seq - (test "Functor respects Log." + (test "Functor respects Writer." (i.= 11 (product;right (&/map i.inc ["" 10])))) - (test "Applicative respects Log." + (test "Applicative respects Writer." (and (i.= 20 (product;right (&/wrap 20))) (i.= 30 (product;right (&/apply (&/wrap (i.+ 10)) (&/wrap 20)))))) - (test "Monad respects Log." - (i.= 30 (product;right (do (&;Monad<Log> text;Monoid<Text>) + (test "Monad respects Writer." + (i.= 30 (product;right (do (&;Monad<Writer> text;Monoid<Text>) [f (wrap i.+) a (wrap 10) b (wrap 20)] @@ -33,8 +33,8 @@ (context: "Monad transformer" (let [lift (&;lift text;Monoid<Text> io;Monad<IO>) (^open "io/") io;Monad<IO>] - (test "Can add log functionality to any monad." - (|> (io;run (do (&;LogT text;Monoid<Text> io;Monad<IO>) + (test "Can add writer functionality to any monad." + (|> (io;run (do (&;WriterT text;Monoid<Text> io;Monad<IO>) [a (lift (io/wrap 123)) b (wrap 456)] (wrap (i.+ a b)))) diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux index fffe409c4..9b0f8ff11 100644 --- a/stdlib/test/tests.lux +++ b/stdlib/test/tests.lux @@ -23,6 +23,7 @@ ["_;" pipe] ["_;" cont] ["_;" reader] + ["_;" writer] ["_;" state] ["_;" parser]) (data ["_;" bit] @@ -30,7 +31,6 @@ ["_;" result] ["_;" ident] ["_;" identity] - ["_;" log] ["_;" maybe] ["_;" number] ["_;" product] |