diff options
author | dos-reis <gdr@axiomatics.org> | 2011-11-17 23:23:48 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-11-17 23:23:48 +0000 |
commit | a154a14b31d67111668ac9c9fb26578ff54f5f4e (patch) | |
tree | cac9d380871e4a9b06af6956bba0ba1c41a13ed8 /src/interp | |
parent | 3f5e42cc9a9db6ddbbb90d130826ad6dd3b7d770 (diff) | |
download | open-axiom-a154a14b31d67111668ac9c9fb26578ff54f5f4e.tar.gz |
* interp/i-eval.boot (evaluateType): Handle % and and signatures.
(evaluateFormAsType): Handle builtin constructor instantiations.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-eval.boot | 10 |
1 files changed, 7 insertions, 3 deletions
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)) => |