aboutsummaryrefslogtreecommitdiff
path: root/frontend/containers.icl
diff options
context:
space:
mode:
authorjohnvg2003-12-15 15:25:46 +0000
committerjohnvg2003-12-15 15:25:46 +0000
commit81999c73611b1b21745aeebb0d22c27e5579f905 (patch)
treecf8b4b8877bd5ad031272866c5a97112195ba35e /frontend/containers.icl
parentadd BEInsertForeignExport (diff)
add foreign export
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1436 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/containers.icl')
-rw-r--r--frontend/containers.icl18
1 files changed, 18 insertions, 0 deletions
diff --git a/frontend/containers.icl b/frontend/containers.icl
index fae67f1..eaaa08c 100644
--- a/frontend/containers.icl
+++ b/frontend/containers.icl
@@ -326,6 +326,24 @@ append_strictness strictness (Strict s)
append_strictness strictness (StrictList s l)
= StrictList s (append_strictness strictness l)
+first_n_are_strict :: !Int !StrictnessList -> Bool
+first_n_are_strict 0 _
+ = True
+first_n_are_strict n NotStrict
+ = False
+first_n_are_strict n (Strict s)
+ | n>32
+ = False
+ | n==32
+ = s==0xffffffff
+ # m=(1<<n)-1
+ = s bitand m==m
+first_n_are_strict n (StrictList s l)
+ | n>=32
+ = s==0xffffffff && first_n_are_strict (n-32) l
+ # m=(1<<n)-1
+ = s bitand m==m
+
screw :== 80
:: IntKey :== Int