diff options
author | dos-reis <gdr@axiomatics.org> | 2011-10-25 22:14:09 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-10-25 22:14:09 +0000 |
commit | a4858ca2cb47dcaa229683dda30d167f49b4c3a6 (patch) | |
tree | 1b1fc23562977d995f41dd7c493c60b8ff6aa0ea /src | |
parent | a0f5324aaab8bf19cad2dc6b80e9e026eea02854 (diff) | |
download | open-axiom-a4858ca2cb47dcaa229683dda30d167f49b4c3a6.tar.gz |
* interp/compiler.boot (getFormModemaps): Tidy checking of "elt"
and "setelt" modemaps.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/compiler.boot | 15 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ef428e8a..623ef907 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-10-25 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (getFormModemaps): Tidy checking of "elt" + and "setelt" modemaps. + +2011-10-25 Gabriel Dos Reis <gdr@cs.tamu.edu> + * algebra/modmon.spad.pamphlet (ModMonic): Rename second parameter from Rep to P. Addd capsule-level definition for Rep. [setPoly]: Adjust parameter type. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index e0fae8b4..25ab8c1a 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -625,19 +625,18 @@ compFormWithModemap(form,m,e,modemap) == ++ case is made for a modemap whose sole parameter type is a Tuple. ++ In that case, it matches any number of supplied arguments. getFormModemaps(form is [op,:argl],e) == - op is ["elt",domain,op1] => + op is ["elt",domain,op1] and isDomainForm(domain,e) => [x for x in getFormModemaps([op1,:argl],e) | x.mmDC = domain] - cons? op => nil - modemapList:= get(op,"modemap",e) + op is [.,:.] => nil + modemapList := get(op,"modemap",e) -- Within default implementations, modemaps cannot mention the -- current domain. if $insideCategoryPackageIfTrue then modemapList := [x for x in modemapList | x.mmDC isnt '$] - if op is "elt" - then modemapList:= eltModemapFilter(last argl,modemapList,e) or return nil - else - if op is "setelt" then modemapList:= - seteltModemapFilter(second argl,modemapList,e) or return nil + if form is ["elt",.,f] then + modemapList := eltModemapFilter(f,modemapList,e) or return nil + else if form is ["setelt",.,f,.] then + modemapList := seteltModemapFilter(f,modemapList,e) or return nil nargs := #argl finalModemapList:= [mm for mm in modemapList | enoughArguments(argl,mm.mmSource)] |