From fa4294f205cbc0398db0e80b7dbbe8daf7795024 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 19 May 2013 04:22:53 +0000 Subject: Tidy getSignature --- src/ChangeLog | 4 ++++ src/interp/define.boot | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 37844e25..84f3ddcc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-05-18 Gabriel Dos Reis + + * interp/define.boot (getSignature): Tidy. + 2013-05-18 Gabriel Dos Reis * algebra/cycles.spad.pamphlet (CycleIndicators) [nniBump]: New diff --git a/src/interp/define.boot b/src/interp/define.boot index c17905c4..c5f7e073 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -2020,14 +2020,13 @@ addDomain(domain,e) == getSignature(op,argModeList,$e) == - 1=# - (sigl:= - removeDuplicates - [sig - for [[dc,:sig],[pred,:.]] in (mmList:= get(op,'modemap,$e)) | dc='_$ - and sig.source = argModeList and knownInfo(pred,$e)]) => first sigl + mmList := get(op,'modemap,$e) + sigl := removeDuplicates + [sig for [[dc,:sig],[pred,:.]] in mmList + | dc='$ and sig.source = argModeList and knownInfo(pred,$e)] + sigl is [sig] => sig null sigl => - (u:= getXmode(op,$e)) is ['Mapping,:sig] => sig + getXmode(op,$e) is ['Mapping,:sig] => sig SAY '"************* USER ERROR **********" SAY("available signatures for ",op,": ") if null mmList @@ -2035,7 +2034,6 @@ getSignature(op,argModeList,$e) == else for [[dc,:sig],:.] in mmList repeat printSignature(" ",op,sig) printSignature("NEED ",op,["?",:argModeList]) nil - 1=#sigl => first sigl stackSemanticError(["duplicate signatures for ",op,": ",argModeList],nil) --% ARGUMENT CONDITION CODE -- cgit v1.2.3