diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-06 15:23:36 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-06 15:23:36 +0000 |
commit | 62fb1ed88e7c6a94e1ba833a2078cc162e1a44f9 (patch) | |
tree | c78458eff7f895c11fc5e714e579ffd152eb5786 /src/interp/i-coerce.boot | |
parent | 1747742ca654ed7b8907a3622a3e5dffeff9931e (diff) | |
download | open-axiom-62fb1ed88e7c6a94e1ba833a2078cc162e1a44f9.tar.gz |
* interp/wi2.boot: Replace INTEGERP, STRINGP, SYMBOLP, CONSP with
integer?, string?, symbol?, and cons? respectively.
* interp/wi1.boot: Likewise.
* interp/trace.boot: Likewise.
* interp/sys-utility.boot: Likewise.
* interp/showimp.boot: Likewise.
* interp/setvars.boot: Likewise.
* interp/record.boot: Likewise.
* interp/pspad2.boot: Likewise.
* interp/pspad1.boot: Likewise.
* interp/postpar.boot: Likewise.
* interp/posit.boot: Likewise.
* interp/pf2sex.boot: Likewise.
* interp/pf2atree.boot: Likewise.
* interp/parse.boot: Likewise.
* interp/packtran.boot: Likewise.
* interp/nrunopt.boot: Likewise.
* interp/nrungo.boot: Likewise.
* interp/nrunfast.boot: Likewise.
* interp/nruncomp.boot: Likewise.
* interp/newfort.boot: Likewise.
* interp/msgdb.boot: Likewise.
* interp/msg.boot: Likewise.
* interp/modemap.boot: Likewise.
* interp/match.boot: Likewise.
* interp/mark.boot: Likewise.
* interp/interop.boot: Likewise.
* interp/int-top.boot: Likewise.
* interp/i-toplev.boot: Likewise.
* interp/i-syscmd.boot: Likewise.
* interp/i-spec2.boot: Likewise.
* interp/i-spec1.boot: Likewise.
* interp/i-resolv.boot: Likewise.
* interp/i-output.boot: Likewise.
* interp/i-object.boot: Likewise.
* interp/i-map.boot: Likewise.
* interp/i-intern.boot: Likewise.
* interp/i-funsel.boot: Likewise.
* interp/i-eval.boot: Likewise.
* interp/i-coerfn.boot: Likewise.
* interp/i-coerce.boot: Likewise.
* interp/i-analy.boot: Likewise.
* interp/htsetvar.boot: Likewise.
* interp/htcheck.boot: Likewise.
* interp/ht-util.boot: Likewise.
* interp/ht-root.boot: Likewise.
* interp/g-util.boot: Likewise.
* interp/g-opt.boot: Likewise.
* interp/g-error.boot: Likewise.
* interp/g-boot.boot: Likewise.
* interp/functor.boot: Likewise.
* interp/fortcall.boot: Likewise.
* interp/format.boot: Likewise.
* interp/diagnostics.boot: Likewise.
* interp/define.boot: Likewise.
* interp/compress.boot: Likewise.
* interp/compiler.boot: Likewise.
* interp/clammed.boot: Likewise.
* interp/clam.boot: Likewise.
* interp/cformat.boot: Likewise.
* interp/cattable.boot: Likewise.
* interp/category.boot: Likewise.
* interp/c-util.boot: Likewise.
* interp/c-doc.boot: Likewise.
* interp/buildom.boot: Likewise.
* interp/br-util.boot: Likewise.
* interp/br-search.boot: Likewise.
* interp/br-saturn.boot: Likewise.
* interp/br-op2.boot: Likewise.
* interp/br-op1.boot: Likewise.
* interp/br-data.boot: Likewise.
* interp/br-con.boot: Likewise.
* interp/bc-util.boot: Likewise.
* interp/ax.boot: Likewise.
* interp/as.boot: Likewise.
* boot/translator.boot: Likewise.
* boot/ast.boot: Likewise.
* boot/includer.boot: Likewise.
* boot/tokens.boot: Add new replacement for integer?, string?,
symbol? and cons?
Diffstat (limited to 'src/interp/i-coerce.boot')
-rw-r--r-- | src/interp/i-coerce.boot | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index f9bb6133..a1dad5ea 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2009, Gabriel Dos Reis. +-- Copyright (C) 2007-2010, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -88,7 +88,7 @@ coerceOrThrowFailure(value, t1, t2) == retract object == type := objMode object - STRINGP type => 'failed + string? type => 'failed type = $EmptyMode => 'failed val := objVal object not isWrapped val and val isnt ["%Map",:.] => 'failed @@ -103,7 +103,7 @@ retract1 object == -- This is mostly for cases such as constant polynomials or -- quotients with 1 in the denominator. type := objMode object - STRINGP type => 'failed + string? type => 'failed val := objVal object type = $PositiveInteger => objNew(val,$NonNegativeInteger) type = $NonNegativeInteger => objNew(val,$Integer) @@ -415,13 +415,13 @@ canCoerce1(t1,t2) == NIL -- next is for tagged union selectors for the time being t1 is ['Variable,=t2] or t2 is ['Variable,=t1] => true - STRINGP t1 => + string? t1 => t2 = $String => true t2 = $OutputForm => true t2 is ['Union,:.] => canCoerceUnion(t1,t2) t2 is ['Variable,v] and (t1 = PNAME(v)) => true NIL - STRINGP t2 => + string? t2 => t1 is ['Variable,v] and (t2 = PNAME(v)) => true NIL atom t1 or atom t2 => NIL @@ -516,7 +516,7 @@ canCoerceExplicit2Mapping(t1,t is ['Mapping,target,:argl]) == funNode := mkAtreeNode fun transferPropsToNode(fun,funNode) mms := CATCH('coerceOrCroaker, selectLocalMms(funNode,fun,argl,target)) - CONSP mms => + cons? mms => mms is [[['interpOnly,:.],:.]] => nil mm := CAAR mms mm is [., targ, :.] => @@ -837,18 +837,18 @@ coerceInt1(triple,t2) == -- next is for tagged union selectors for the time being t1 is ['Variable,=t2] or t2 is ['Variable,=t1] => objNew(val,t2) - STRINGP t2 => + string? t2 => t1 is ['Variable,v] and (t2 = PNAME(v)) => objNewWrap(t2,t2) val' := unwrap val (t2 = val') and ((val' = t1) or (t1 = $String)) => objNew(val,t2) NIL t1 is ['Union,:.] => coerceIntFromUnion(triple,t2) t2 is ['Union,:.] => coerceInt2Union(triple,t2) - (STRINGP t1) and (t2 = $String) => objNew(val,$String) - (STRINGP t1) and (t2 is ['Variable,v]) => + (string? t1) and (t2 = $String) => objNew(val,$String) + (string? t1) and (t2 is ['Variable,v]) => t1 = PNAME(v) => objNewWrap(v,t2) NIL - (STRINGP t1) and (t1 = unwrap val) => + (string? t1) and (t1 = unwrap val) => t2 = $OutputForm => objNew(t1,$OutputForm) NIL atom t1 => NIL @@ -902,7 +902,7 @@ coerceInt1(triple,t2) == NIL NIL - EQ(first(t1),'Variable) and CONSP(t2) and + EQ(first(t1),'Variable) and cons?(t2) and (isEqualOrSubDomain(t2,$Integer) or (t2 = [$QuotientField, $Integer]) or MEMQ(first(t2), '(RationalNumber BigFloat NewFloat Float DoubleFloat))) => NIL |