aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
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