aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/remember.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/remember.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux
index 264d13adb..bce726fb1 100644
--- a/stdlib/source/library/lux/control/remember.lux
+++ b/stdlib/source/library/lux/control/remember.lux
@@ -4,11 +4,10 @@
[abstract
[monad (.only do)]]
[control
+ ["<>" parser (.use "[1]#[0]" functor)]
["[0]" io]
["[0]" try]
- ["[0]" exception (.only exception)]
- ["<>" parser (.use "[1]#[0]" functor)
- ["<c>" code (.only Parser)]]]
+ ["[0]" exception (.only exception)]]
[data
["[0]" text
["%" \\format (.only format)]]]
@@ -17,9 +16,10 @@
["[0]" date (.only Date) (.use "[1]#[0]" order)]]
["[0]" meta]
[macro
- ["[0]" code]
+ [syntax (.only syntax)]
["[0]" template]
- [syntax (.only syntax)]]]])
+ ["[0]" code (.only)
+ ["<[1]>" \\parser (.only Parser)]]]]])
(exception .public (must_remember [deadline Date
today Date
@@ -40,9 +40,9 @@
(Parser Date)
(all <>.either
(<>#each (|>> instant.of_millis instant.date)
- <c>.int)
+ <code>.int)
(do <>.monad
- [raw <c>.text]
+ [raw <code>.text]
(case (at date.codec decoded raw)
{try.#Success date}
(in date)
@@ -52,8 +52,8 @@
(def .public remember
(syntax (_ [deadline ..deadline
- message <c>.text
- focus (<>.maybe <c>.any)])
+ message <code>.text
+ focus (<>.maybe <code>.any)])
(let [now (io.run! instant.now)
today (instant.date now)]
(if (date#< deadline today)
@@ -68,8 +68,8 @@
(with_template [<name> <message>]
[(`` (def .public <name>
(syntax (_ [deadline ..deadline
- message <c>.text
- focus (<>.maybe <c>.any)])
+ message <code>.text
+ focus (<>.maybe <code>.any)])
(in (list (` (..remember (~ (code.text (%.date deadline)))
(~ (code.text (format <message> " " message)))
(~+ (case focus