aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-09-18 14:26:35 +0000
committerdos-reis <gdr@axiomatics.org>2008-09-18 14:26:35 +0000
commit4126dc2b32ee818635e57990b3e6f647b9a7dbcb (patch)
tree63a1bab1ef8e5c3b301683069c6e42d6076c5cf8 /src/interp
parentc7922bf127eac4b203fc3c36b0ae1d0f9d279f54 (diff)
downloadopen-axiom-4126dc2b32ee818635e57990b3e6f647b9a7dbcb.tar.gz
* interp/c-util.boot (displayAmbiguousSignatures): New.
(ambiguousSignatureError): Likewise. * interp/define.boot (hasSigInTargetCategory): Use it to reject ambiguous lhs of a definition. * interp/lisplib.boot (leaveIfErrors): Fix typo. * algebra/aggcat.spad.pamphlet: Disambiguate definitions. * algebra/card.spad.pamphlet: Likewise. * algebra/dhmatrix.spad.pamphlet: Likewise. * algebra/divisor.spad.pamphlet: Likewise. * algebra/expexpan.spad.pamphlet: Likewise. * algebra/ffcat.spad.pamphlet: Likewise. * algebra/ffcg.spad.pamphlet: Likewise. * algebra/ffnb.spad.pamphlet: Likewise. * algebra/ffp.spad.pamphlet: Likewise. * algebra/generic.spad.pamphlet: Likewise. * algebra/groebf.spad.pamphlet: Likewise. * algebra/modring.spad.pamphlet: Likewise. * algebra/moebius.spad.pamphlet: Likewise. * algebra/mts.spad.pamphlet: Likewise. * algebra/naalgc.spad.pamphlet: Likewise. * algebra/ore.spad.pamphlet: Likewise. * algebra/outform.spad.pamphlet: Likewise. * algebra/pf.spad.pamphlet: Likewise. * algebra/poly.spad.pamphlet: Likewise. * algebra/polycat.spad.pamphlet: Likewise. * algebra/prtition.spad.pamphlet: Likewise. * algebra/radix.spad.pamphlet: Likewise. * algebra/rep2.spad.pamphlet: Likewise. * algebra/stream.spad.pamphlet: Likewise. * algebra/string.spad.pamphlet: Likewise. * algebra/tree.spad.pamphlet: Likewise. * algebra/triset.spad.pamphlet: Likewise. * algebra/view2D.spad.pamphlet: Likewise. * algebra/sf.spad.pamphlet: Remove signature for hash. * algebra/si.spad.pamphlet: Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot14
-rw-r--r--src/interp/define.boot6
-rw-r--r--src/interp/lisplib.boot2
3 files changed, 17 insertions, 5 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index c45159a7..3735a815 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -794,3 +794,17 @@ displayModemaps E ==
GCOPY ob == COPY ob -- for now
+--%
+++ format the set of candidate operations.
+displayAmbiguousSignatures(op,sigs) ==
+ [:showCandidate(op, sig) for sig in sigs] where
+ showCandidate(op,sig) ==
+ ["%l", " ", op, '": ",
+ :bright formatUnabbreviated ["Mapping",:sig]]
+
+++ Display diagnostic message about ambiguous operation `op', with
+++ possible resolutions given by the list `sigs'.
+ambiguousSignatureError(op, sigs) ==
+ stackSemanticError(['"signature of lhs not unique. Candidates are:",
+ :displayAmbiguousSignatures($op,sigs)],nil)
+
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 2e096be4..2d1a94e4 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -996,10 +996,8 @@ hasSigInTargetCategory(argl,form,opsig,e) ==
--accept only those signatures op right length which match declared modes
0=c => (#(sig:= getSignatureFromMode(form,e))=#form => sig; nil)
1<c =>
- sig:= first potentialSigList
- stackWarning('"signature of lhs not unique: %1bp chosen",
- [["Mapping",:sig]])
- sig
+ ambiguousSignatureError($op,potentialSigList)
+ first potentialSigList
nil --this branch will force all arguments to be declared
compareMode2Arg(x,m) == null x or modeEqual(x,m)
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 7296b447..641b2799 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -425,7 +425,7 @@ initializeLisplib libName ==
++ return to toplevel reader.
leaveIfErrors libName ==
errorCount() ^=0 =>
- sayMSG ['" Errors in processing ",$liplibkind,'" ",:bright libName,'":"]
+ sayMSG ['" Errors in processing ",$lisplibKind,'" ",:bright libName,'":"]
sayMSG ['" not replacing ",$spadLibFT,'" for",:bright libName]
spadThrow()