aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/ir-utils.stanza
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
-rw-r--r--src/main/stanza/ir-utils.stanza6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza
index 14383977..7a9cff31 100644
--- a/src/main/stanza/ir-utils.stanza
+++ b/src/main/stanza/ir-utils.stanza
@@ -142,6 +142,12 @@ public defn exp-hash (e:Expression) -> Int :
public defn type-hash (t:Type) -> Int :
symbol-hash(to-symbol(to-string(t)))
+public defn list-hash (l:List) -> Int :
+ turn-off-debug(false)
+ val i = symbol-hash(to-symbol(string-join(map(to-string,l))))
+ turn-on-debug(false)
+ i
+
;============= Useful functions ==============
public defn create-mask (n:Symbol,dt:Type) -> Field :
Field{n,DEFAULT,_} $ match(dt) :