diff options
author | dos-reis <gdr@axiomatics.org> | 2010-07-03 23:17:46 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-07-03 23:17:46 +0000 |
commit | 704439cfc3b15316702dabe92419b9cd2f2fe9d7 (patch) | |
tree | 5d0a3ae67abed87e874be3ce9790468b284dd839 /src/interp/wi1.boot | |
parent | 9f34933f2f76a2a59e70e458ba529c99ae7e64d8 (diff) | |
download | open-axiom-704439cfc3b15316702dabe92419b9cd2f2fe9d7.tar.gz |
* interp/category.boot (isCategoryForm): Tidy.
* interp/compiler.boot (compMacro): Handle parameterized definition.
* interp/define.boot (macroExpand): Likewise.
(macroExpandList): Move case for niladic macros to macroExpand.
* interp/g-util.boot (putMacro): New utility function.
Diffstat (limited to 'src/interp/wi1.boot')
-rw-r--r-- | src/interp/wi1.boot | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index f8f7c5c9..4cd28026 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -511,7 +511,7 @@ compMacro(form,m,e) == :formatUnabbreviated lhs,'" ==> ",:rhs,'%d] ["MDEF",lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e) m=$EmptyMode or m=$NoValueMode => - ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)] + ["/throwAway",$NoValueMode,putMacro(lhs.op,rhs,e)] --compMacro(form,m,e) == -- $macroIfTrue: local:= true @@ -527,7 +527,7 @@ compMacro(form,m,e) == -- ["MDEF",lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e) -- m=$EmptyMode or m=$NoValueMode => -- rhs := markMacro(lhs,rhs) --- ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)] +-- ["/throwAway",$NoValueMode,putMacro(lhs.op,rhs,e)] compSetq(oform,m,E) == ["%LET",form,val] := oform @@ -1076,7 +1076,7 @@ compDefine1(form,m,e) == --1. decompose after macro-expanding form ['DEF,lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e) $insideWhereIfTrue and isMacro(form,e) and (m=$EmptyMode or m=$NoValueMode) - => [lhs,m,put(first lhs,"macro",rhs,e)] + => [lhs,m,putMacro(lhs.op,rhs,e)] null signature.target and not MEMQ(KAR rhs,$BuiltinConstructorNames) and (sig:= getSignatureFromMode(lhs,e)) => -- here signature of lhs is determined by a previous declaration |