aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/time/duration.lux5
1 files changed, 5 insertions, 0 deletions
diff --git a/stdlib/source/lux/time/duration.lux b/stdlib/source/lux/time/duration.lux
index 4537ba8d5..a91553544 100644
--- a/stdlib/source/lux/time/duration.lux
+++ b/stdlib/source/lux/time/duration.lux
@@ -3,6 +3,7 @@
(lux (control eq
order
codec
+ [monoid #+ Monoid]
["p" parser]
[monad #+ do])
(data [number "int/" Codec<Text,Int> Number<Int>]
@@ -76,6 +77,10 @@
(def: #export normal-year Duration (scale 365 day))
(def: #export leap-year Duration (merge day normal-year))
+(struct: #export _ (Monoid Duration)
+ (def: identity empty)
+ (def: compose merge))
+
(def: (encode duration)
(-> Duration Text)
(if (:: Eq<Duration> = empty duration)