summaryrefslogtreecommitdiff
path: root/lib/std/intparse.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/intparse.myr')
-rw-r--r--lib/std/intparse.myr10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/intparse.myr b/lib/std/intparse.myr
index 18cc478..446abc8 100644
--- a/lib/std/intparse.myr
+++ b/lib/std/intparse.myr
@@ -7,8 +7,8 @@ use "types"
use "utf"
pkg std =
- generic intparsebase : (s : byte[:], base : int -> option(@a::(integral,numeric)))
- generic intparse : (s : byte[:] -> option(@a::(integral,numeric)))
+ generic intparsebase : (s : byte[:], base : int -> option(@a)) :: integral,numeric @a
+ generic intparse : (s : byte[:] -> option(@a)) :: integral,numeric @a
;;
generic intparse = {s
@@ -47,7 +47,7 @@ generic intparsebase = {s, base
-> doparse(s, isneg, base)
}
-generic doparse = {s, isneg, base -> option(@a::(integral,numeric))
+generic doparse = {s, isneg, base -> option(@a) :: integral,numeric @a
var v
var cv : int32
@@ -58,8 +58,8 @@ generic doparse = {s, isneg, base -> option(@a::(integral,numeric))
;;
cv = charval(c, base)
if cv >= 0
- v *= (base : @a::(integral,numeric))
- v += (cv : @a::(integral,numeric))
+ v *= (base : @a)
+ v += (cv : @a)
else
-> `None
;;