aboutsummaryrefslogtreecommitdiff
path: root/frontend/utilities.icl
diff options
context:
space:
mode:
authormartinw2001-05-04 15:18:05 +0000
committermartinw2001-05-04 15:18:05 +0000
commit0162ee8a74144a6c9f76eb14fad85f70101e6063 (patch)
tree1b4bd8fd56937e07722401e43f2f61a078e4dc09 /frontend/utilities.icl
parentbugfix: compiler crash at (diff)
satisfying John's pervert and bizarre wishes for better error messages
concerning specified instance types, that by far go beyond the standards of Clean 1.3.3 git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@392 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/utilities.icl')
-rw-r--r--frontend/utilities.icl11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/utilities.icl b/frontend/utilities.icl
index 3ceb48b..50dd8d2 100644
--- a/frontend/utilities.icl
+++ b/frontend/utilities.icl
@@ -139,6 +139,17 @@ second_of_2_tuple t :== e2
where
(_,e2) = t
+map2St f l1 l2 st :== map2_st l1 l2 st
+ where
+ map2_st [h1:t1] [h2:t2] st
+ # (h, st) = f h1 h2 st
+ (t, st) = map2_st t1 t2 st
+ #! st = st
+ = ([h:t], st)
+ map2_st _ _ st
+ #! st = st
+ = ([], st)
+
app2St :: !(!.(.a -> .(.st -> (.c,.st))),!.(.e -> .(.st -> (.f,.st)))) !(.a,.e) !.st -> (!(.c,.f),!.st)
app2St (f,g) (x,y) s
# (x, s) = f x s