aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-17 23:23:48 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-17 23:23:48 +0000
commita154a14b31d67111668ac9c9fb26578ff54f5f4e (patch)
treecac9d380871e4a9b06af6956bba0ba1c41a13ed8 /src
parent3f5e42cc9a9db6ddbbb90d130826ad6dd3b7d770 (diff)
downloadopen-axiom-a154a14b31d67111668ac9c9fb26578ff54f5f4e.tar.gz
* interp/i-eval.boot (evaluateType): Handle % and and signatures.
(evaluateFormAsType): Handle builtin constructor instantiations.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/i-eval.boot10
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e61fe00f..2dca6f61 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-17 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/i-eval.boot (evaluateType): Handle % and and signatures.
+ (evaluateFormAsType): Handle builtin constructor instantiations.
+
2011-11-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/category.boot (mkCategory): Tidy.
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index 5572f087..fc92a6db 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -119,11 +119,12 @@ evaluateType form ==
-- on non-type valued arguemnts to the constructor
-- and finally checking to see whether the type satisfies the
-- conditions of its modemap
- domain:= isDomainValuedVariable form => domain
+ form is "$" => form
+ form is "%" => "$" --FIXME we should switch to "%" wholesale
form = $EmptyMode => form
- form = "?" => $EmptyMode
+ form is "?" => $EmptyMode
string? form => form
- form = "$" => form
+ domain := isDomainValuedVariable form => domain
$expandSegments : local := nil
form is ['typeOf,.] =>
objVal getValue elaborateForm form
@@ -149,6 +150,7 @@ evaluateType form ==
for [arg,:args] in tails argl repeat
symbolMember?(arg,args) => throwKeyedMsg("S2IL0032",[arg])
form
+ op is ":" and argl is [x,t] => [op,x,evaluateType t]
evaluateFormAsType form
ident? form and niladicConstructor? form => evaluateType [form]
ident? form and (constructor? form or builtinConstructor? form) =>
@@ -161,6 +163,8 @@ evaluateType form ==
++ canonical form of the type.
evaluateFormAsType form ==
form is [op,:args] and constructor? op => evaluateType1 form
+ form is [op,:args] and ident? op and builtinConstructor? op =>
+ [op,:[evaluateFormAsType x for x in args]]
t := mkAtree form
-- ??? Maybe we should be more careful about generalized types.
bottomUp t is [m] and (member(m,$LangSupportTypes) or isCategoryForm(m,$e)) =>