aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-30 11:30:50 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-30 11:30:50 +0000
commitd5c29fa0bc701ece460849cf1d3dbdf761250f86 (patch)
treec88b6dba656a0bc2d11e80ac4691f9b51e681d8e /src/interp
parent4b6d9e4b6f9438b4268ed1230b23d1d83ad8aff3 (diff)
downloadopen-axiom-d5c29fa0bc701ece460849cf1d3dbdf761250f86.tar.gz
* interp/c-util.boot (getRepresentation): Tidy.
* interp/define.boot (checkRepresentation): Don't compile the base domain here yet.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot3
-rw-r--r--src/interp/define.boot5
2 files changed, 3 insertions, 5 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index e79aba6b..1403eaf8 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -132,7 +132,8 @@ substituteDollarIfRepHack m ==
++ current functor, if any.
getRepresentation: %Env -> %Maybe %Mode
getRepresentation e ==
- (get("Rep","value",e) or return nil).expr
+ u := get('Rep,'value,e) => u.expr
+ get('Rep,'macro,e)
++ Returns true if the form `t' is an instance of the Tuple constructor.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index d40033e0..ad52ec88 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -257,11 +257,8 @@ checkRepresentation(addForm,body,env) ==
$subdomain := true
dom
addForm
- base := compForMode(domainRep,$EmptyMode,env) or
- stackAndThrow('"1b is not a domain",[domainRep])
$useRepresentationHack := false
- env := put("Rep","value",removeEnv base,env)
- -- ??? Maybe we should also make Rep available as macro?
+ env := put('Rep,'macro,domainRep,env)
env