aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/licentia
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/licentia')
-rw-r--r--stdlib/source/program/licentia/input.lux11
1 files changed, 7 insertions, 4 deletions
diff --git a/stdlib/source/program/licentia/input.lux b/stdlib/source/program/licentia/input.lux
index 7af7c33d4..6d64515cf 100644
--- a/stdlib/source/program/licentia/input.lux
+++ b/stdlib/source/program/licentia/input.lux
@@ -8,7 +8,10 @@
[text
["%" format (#+ format)]]
[format
- ["." json (#+ Reader)]]]]
+ ["." json (#+ Reader)]]
+ [number
+ ["." int]
+ ["f" frac]]]]
[//
[license (#+ Identification
Termination
@@ -39,10 +42,10 @@
(Reader Nat)
(do parser.monad
[amountF json.number
- #let [amountI (frac-to-int amountF)]
+ #let [amountI (f.int amountF)]
_ (parser.assert (ex.construct cannot-use-fractional-amount amountF)
- (f/= amountF
- (int-to-frac amountI)))
+ (f.= amountF
+ (int.frac amountI)))
_ (parser.assert (ex.construct cannot-use-negative-amount amountI)
(i/> +0 amountI))]
(wrap (.nat amountI))))