From e94336c0a8c400d3aae923dfd9615751b2b65923 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 12 Apr 2008 08:36:47 +0000 Subject: * interp/compiler.boot: Register compiler for Enumeration instantiations. * interp/modemap.boot (compCat): Move to compiler.boot. --- src/interp/compiler.boot | 23 +++++++++++++++++++---- src/interp/modemap.boot | 10 ---------- 2 files changed, 19 insertions(+), 14 deletions(-) (limited to 'src/interp') diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 12a36c52..d3313980 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1592,6 +1592,20 @@ compilerDoitWithScreenedLisplib(constructor, fun) == SEQ(UNEMBED 'RWRITE)) +--% Categories + +compCat(form is [functorName,:argl],m,e) == + fn:= GETL(functorName,"makeFunctionList") or return nil + [funList,e]:= FUNCALL(fn,form,form,e) + catForm:= + ["Join",'(SetCategory),["CATEGORY","domain",: + [["SIGNATURE",op,sig] for [op,sig,.] in funList | op^="="]]] + --RDJ: for coercion purposes, it necessary to know it's a Set; I'm not + --sure if it uses any of the other signatures(see extendsCategoryForm) + [form,catForm,e] + + + --% Interface to the backend compileFileQuietly path == @@ -1604,10 +1618,10 @@ compileFileQuietly path == --% Register compilers for special forms. -- Those compilers are on the `SPECIAL' property of the corresponding -- special form operator symbol. -for x in [["_|", :"compSuchthat"],_ - ["_@", :"compAtSign"],_ - ["_:", :"compColon"],_ - ["_:_:", :"compCoerce"],_ +for x in [["|", :"compSuchthat"],_ + ["@", :"compAtSign"],_ + [":", :"compColon"],_ + ["::", :"compCoerce"],_ ["QUOTE", :"compQuote"],_ ["add", :"compAdd"],_ ["CAPSULE", :"compCapsule"],_ @@ -1619,6 +1633,7 @@ for x in [["_|", :"compSuchthat"],_ ["construct", :"compConstruct"],_ ["DEF", :"compDefine"],_ ["elt", :"compElt"],_ + ["Enumeration", :"compCat"],_ ["exit", :"compExit"],_ ["has", :"compHas"],_ ["IF", : "compIf"],_ diff --git a/src/interp/modemap.boot b/src/interp/modemap.boot index f2ae0fc5..f80df408 100644 --- a/src/interp/modemap.boot +++ b/src/interp/modemap.boot @@ -340,16 +340,6 @@ substNames(domainName,viewName,functorForm,opalist) == for [:modemapform,[sel,"$",pos]] in EQSUBSTLIST(KDR functorForm,$FormalMapVariableList, opalist)] -compCat(form is [functorName,:argl],m,e) == - fn:= GETL(functorName,"makeFunctionList") or return nil - [funList,e]:= FUNCALL(fn,form,form,e) - catForm:= - ["Join",'(SetCategory),["CATEGORY","domain",: - [["SIGNATURE",op,sig] for [op,sig,.] in funList | op^="="]]] - --RDJ: for coercion purposes, it necessary to know it's a Set; I'm not - --sure if it uses any of the other signatures(see extendsCategoryForm) - [form,catForm,e] - addConstructorModemaps(name,form is [functorName,:.],e) == $InteractiveMode: local:= nil e:= putDomainsInScope(name,e) --frame -- cgit v1.2.3