summaryrefslogtreecommitdiff
path: root/libstd/intparse.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-02-10 23:26:32 -0500
committerOri Bernstein <ori@eigenstate.org>2014-02-10 23:26:32 -0500
commit68b18a7fba8313ad5b1d8b4c6be61e3b8b126304 (patch)
treea30c41e3637cd99fd50eefbff36cc617718fdb30 /libstd/intparse.myr
parentc158da43321893956e4be405ed04af37f86259fa (diff)
downloadmc-68b18a7fba8313ad5b1d8b4c6be61e3b8b126304.tar.gz
Do some sanitization on traits.
- Remove tctest: all tests now take a boolean. - Rename traits to more sensible names: tcnum => numeric tcint => integral tcfloat => floating tcidx => indexable tcslice => sliceable - Remove duplicate trait setting. We were setting traits twice in some places, adding ones that didn't belong, which was making pointers look indexable.
Diffstat (limited to 'libstd/intparse.myr')
-rw-r--r--libstd/intparse.myr6
1 files changed, 3 insertions, 3 deletions
diff --git a/libstd/intparse.myr b/libstd/intparse.myr
index 6794891..1ea96bd 100644
--- a/libstd/intparse.myr
+++ b/libstd/intparse.myr
@@ -7,8 +7,8 @@ use "types.use"
use "utf.use"
pkg std =
- generic intparsebase : (s : byte[:], base : int -> option(@a::(tcint,tcnum,tctest)))
- generic intparse : (s : byte[:] -> option(@a::(tcint,tcnum,tctest)))
+ generic intparsebase : (s : byte[:], base : int -> option(@a::(integral,numeric)))
+ generic intparse : (s : byte[:] -> option(@a::(integral,numeric)))
;;
generic intparse = {s
@@ -55,7 +55,7 @@ generic doparse = {s, isneg, base
;;
cv = charval(c, base)
if cv >= 0
- v *= (base castto(@a::(tcint,tcnum,tctest)))
+ v *= (base castto(@a::(integral,numeric)))
v += cv
else
-> `None