aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 4e91e700..c680e8b9 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -113,6 +113,24 @@ wantArgumentsAsTuple: (%List,%Signature) -> %Boolean
wantArgumentsAsTuple(args,sig) ==
isHomoegenousVarargSignature sig and #args ^= #sig
+
+devaluate d ==
+ not REFVECP d => d
+ QSGREATERP(QVSIZE d,5) and getShellEntry(d,3) is ['Category] =>
+ getShellEntry(d,0)
+ QSGREATERP(QVSIZE d,0) =>
+ d':=getShellEntry(d,0)
+ isFunctor d' => d'
+ d
+ d
+
+devaluateList l == [devaluate d for d in l]
+
+devaluateDeeply x ==
+ VECP x => devaluate x
+ atom x => x
+ [devaluateDeeply y for y in x]
+
--% Debugging Functions
--CONTINUE() == continue()