aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/time/day.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/time/day.lux')
-rw-r--r--stdlib/source/lux/time/day.lux11
1 files changed, 7 insertions, 4 deletions
diff --git a/stdlib/source/lux/time/day.lux b/stdlib/source/lux/time/day.lux
index a3f3fb3f2..caabc8797 100644
--- a/stdlib/source/lux/time/day.lux
+++ b/stdlib/source/lux/time/day.lux
@@ -1,9 +1,12 @@
(.module:
- [lux #*
+ [lux (#- nat)
[abstract
[equivalence (#+ Equivalence)]
[order (#+ Order)]
- [enum (#+ Enum)]]])
+ [enum (#+ Enum)]]
+ [data
+ [number
+ ["n" nat]]]])
(type: #export Day
#Sunday
@@ -31,7 +34,7 @@
_
#0)))
-(def: (day-to-nat day)
+(def: (nat day)
(-> Day Nat)
(case day
#Sunday 0
@@ -45,7 +48,7 @@
(structure: #export order (Order Day)
(def: &equivalence ..equivalence)
(def: (< reference sample)
- (n/< (day-to-nat reference) (day-to-nat sample))))
+ (n.< (..nat reference) (..nat sample))))
(structure: #export enum (Enum Day)
(def: &order ..order)