summaryrefslogtreecommitdiff
path: root/lib/std/units.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/units.myr')
-rw-r--r--lib/std/units.myr16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/std/units.myr b/lib/std/units.myr
index 67eab81..76d9e5a 100644
--- a/lib/std/units.myr
+++ b/lib/std/units.myr
@@ -2,14 +2,14 @@ use "types"
pkg std =
/* JEDEC 100B.1 memory sizes */
- generic KiB : @a::(integral,numeric) = 1024
- generic MiB : @a::(integral,numeric) = KiB*1024
- generic GiB : @a::(integral,numeric) = MiB*1024
- generic TiB : @a::(integral,numeric) = GiB*1024
- generic PiB : @a::(integral,numeric) = TiB*1024
- generic EiB : @a::(integral,numeric) = PiB*1024
- generic ZiB : @a::(integral,numeric) = EiB*1024
- generic YiB : @a::(integral,numeric) = ZiB*1024
+ generic KiB : @a = 1024 :: integral,numeric @a
+ generic MiB : @a = KiB*1024 :: integral,numeric @a
+ generic GiB : @a = MiB*1024 :: integral,numeric @a
+ generic TiB : @a = GiB*1024 :: integral,numeric @a
+ generic PiB : @a = TiB*1024 :: integral,numeric @a
+ generic EiB : @a = PiB*1024 :: integral,numeric @a
+ generic ZiB : @a = EiB*1024 :: integral,numeric @a
+ generic YiB : @a = ZiB*1024 :: integral,numeric @a
generic Sec : time = 1_000_000
generic Msec : time = 1_000