aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-10-17 23:51:50 +0000
committerdos-reis <gdr@axiomatics.org>2008-10-17 23:51:50 +0000
commitd68d655abaef0d14652e07608c633b1ff1feefda (patch)
tree21ac14c42a3537584d76376548bc3f9a7255b65d /src/interp
parente5310ade6942ed3028e2f3cbae831a751aefba9e (diff)
downloadopen-axiom-d68d655abaef0d14652e07608c633b1ff1feefda.tar.gz
Fix AW/271
* interp/sys-constants.boot ($Field): New. * interp/i-coerce.boot (retract2Specialization): Ignore expressions whose types do no belong to Field.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/i-coerce.boot10
-rw-r--r--src/interp/sys-constants.boot4
2 files changed, 10 insertions, 4 deletions
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot
index 35a0e23b..4a145952 100644
--- a/src/interp/i-coerce.boot
+++ b/src/interp/i-coerce.boot
@@ -214,10 +214,12 @@ retract2Specialization object ==
type is ['Expression,D] =>
atom val' => nil -- certainly not a fraction
[num,:den] := val'
- -- coerceRetract already handles case where den = 1
- num isnt [0,:num] => NIL
- den isnt [0,:den] => NIL
- objNewWrap([num,:den],[$QuotientField, D])
+ ofCategory(type,$Field) =>
+ -- coerceRetract already handles case where den = 1
+ num isnt [0,:num] => NIL
+ den isnt [0,:den] => NIL
+ objNewWrap([num,:den],[$QuotientField, D])
+ nil
type is ['SimpleAlgebraicExtension,k,rep,.] =>
-- try to retract as an element of rep and see if we can get an
-- element of k
diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot
index f6c9ef10..f4468e15 100644
--- a/src/interp/sys-constants.boot
+++ b/src/interp/sys-constants.boot
@@ -331,6 +331,10 @@ $SideEffectFreeFunctionList ==
--% Types
+++ The Field category form
+$Field ==
+ '(Field)
+
++ The Void domain constructor form
$Void ==
'(Void)