aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/define.boot20
2 files changed, 14 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dec986fa..9d1ee773 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2013-06-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * interp/define.boot (addInfo): Remove.
+ (addinformation): Tidy.
+
+2013-06-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* interp/define.boot (NRTgetLookupFunction): Take a cache table.
Adjust caller.
(NRTextendsCategory1): Likewise.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index d15c4682..9063a911 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -139,7 +139,6 @@ formatInfo(u,e) ==
u is ["SIGNATURE",:v] => ["SIGNATURE","$",:v]
u is ["PROGN",:l] => ["PROGN",:[formatInfo(v,e) for v in l]]
u is ["ATTRIBUTE",v] =>
-
-- The parser can't tell between those attributes that really
-- are attributes, and those that are category names
v isnt [.,:.] and isCategoryForm([v],e) => ["has","$",[v]]
@@ -155,20 +154,19 @@ formatInfo(u,e) ==
liftCond [["not",formatPred(a,e)],formatInfo(c,e)]]
systemError ['"formatInfo",u]
-addInfo(u,e) ==
- $Information:= [formatInfo(u,e),:$Information]
-
addInformation(m,e) ==
- $Information: local := nil
- info(m,e) where
- info(m,e) ==
- --Processes information from a mode declaration in compCapsule
+ facts := ref nil -- list of facts to derive from `m'.
+ deduce(m,facts,e) where
+ deduce(m,facts,e) ==
m isnt [.,:.] => nil
- m is ["CATEGORY",.,:stuff] => for u in stuff repeat addInfo(u,e)
- m is ["Join",:stuff] => for u in stuff repeat info(u,e)
+ m is ["CATEGORY",.,:stuff] =>
+ for u in stuff repeat
+ deref(facts) := [formatInfo(u,e),:deref facts]
+ m is ["Join",:stuff] =>
+ for u in stuff repeat deduce(u,facts,e)
nil
put("$Information","special",
- [:$Information,:get("$Information","special",e)],e)
+ [:deref facts,:get("$Information","special",e)],e)
hasToInfo (pred is ["has",a,b]) ==
b is ["SIGNATURE",:data] => ["SIGNATURE",a,:data]