aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/licentia
diff options
context:
space:
mode:
authorEduardo Julian2019-07-24 23:23:13 -0400
committerEduardo Julian2019-07-24 23:23:13 -0400
commit30c19b40f5fd583d19aa7cf495a19c1b91f86320 (patch)
tree77cda2c601e7975b665a358b96b7ae00882d3ed9 /stdlib/source/program/licentia
parent68b37de7281d31470263d0e06bc72b1c5b6c2e32 (diff)
No more "f/"-prefixed functions.
+ No more "m/"-prefixed functions.
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))))