diff options
Diffstat (limited to 'stdlib/source/library/lux/math/number/i32.lux')
-rw-r--r-- | stdlib/source/library/lux/math/number/i32.lux | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/math/number/i32.lux b/stdlib/source/library/lux/math/number/i32.lux index 4f588d46b..3fc667291 100644 --- a/stdlib/source/library/lux/math/number/i32.lux +++ b/stdlib/source/library/lux/math/number/i32.lux @@ -8,6 +8,7 @@ ["[0]" maybe] ["[0]" try]] [meta + ["@" target] ["[0]" static] ["[0]" type (.only) ["?[1]" \\parser]]]]] @@ -17,12 +18,23 @@ (def sub (maybe.trusted (i64.sub 32))) -(`` (type .public I32 - (I64 (,, (|> (type_of ..sub) - (?type.result (?type.applied (?.after (?type.exactly i64.Sub) - ?type.any))) - try.trusted - (static.literal type.code)))))) +(for @.old + (def .public I32 + Type + (when (type_of ..sub) + {.#Apply :size: :sub:} + (type_literal (I64 :size:)) + + _ + (undefined))) + + (`` (type .public I32 + (I64 (,, (|> (type_of ..sub) + (?type.result (?type.applied (?.after (?type.exactly i64.Sub) + ?type.any))) + try.trusted + (static.literal type.code)))))) + ) (def .public equivalence (Equivalence I32) (of ..sub sub_equivalence)) (def .public width Nat (of ..sub bits)) |