diff options
Diffstat (limited to 'stdlib/source/lux/target/jvm/encoding/unsigned.lux')
-rw-r--r-- | stdlib/source/lux/target/jvm/encoding/unsigned.lux | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/stdlib/source/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/lux/target/jvm/encoding/unsigned.lux index 4286976dc..65e3632f7 100644 --- a/stdlib/source/lux/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/lux/target/jvm/encoding/unsigned.lux @@ -41,16 +41,20 @@ (n.< (:representation reference) (:representation sample)))) - (exception: #export (value-exceeds-the-maximum {value Nat} + (exception: #export (value-exceeds-the-maximum {type Name} + {value Nat} {maximum (Unsigned Any)}) (exception.report + ["Type" (%.name type)] ["Value" (%.nat value)] ["Maximum" (%.nat (:representation maximum))])) (exception: #export [brand] (subtraction-cannot-yield-negative-value + {type Name} {parameter (Unsigned brand)} {subject (Unsigned brand)}) (exception.report + ["Type" (%.name type)] ["Parameter" (%.nat (:representation parameter))] ["Subject" (%.nat (:representation subject))])) @@ -69,7 +73,7 @@ (-> Nat (Try <name>)) (if (n.<= (:representation <maximum>) value) (#try.Success (:abstraction value)) - (exception.throw ..value-exceeds-the-maximum [value <maximum>]))) + (exception.throw ..value-exceeds-the-maximum [(name-of <name>) value <maximum>]))) (def: #export (<+> parameter subject) (-> <name> <name> (Try <name>)) @@ -83,7 +87,7 @@ subject' (:representation subject)] (if (n.<= subject' parameter') (#try.Success (:abstraction (n.- parameter' subject'))) - (exception.throw ..subtraction-cannot-yield-negative-value [parameter subject])))) + (exception.throw ..subtraction-cannot-yield-negative-value [(name-of <name>) parameter subject])))) (def: #export (<max> left right) (-> <name> <name> <name>) |