aboutsummaryrefslogtreecommitdiff
path: root/frontend/utilities.dcl
diff options
context:
space:
mode:
authormartinw2001-05-04 15:18:05 +0000
committermartinw2001-05-04 15:18:05 +0000
commit0162ee8a74144a6c9f76eb14fad85f70101e6063 (patch)
tree1b4bd8fd56937e07722401e43f2f61a078e4dc09 /frontend/utilities.dcl
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.dcl')
-rw-r--r--frontend/utilities.dcl11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl
index 232330c..965f872 100644
--- a/frontend/utilities.dcl
+++ b/frontend/utilities.dcl
@@ -46,6 +46,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)
mapAppendSt :: !(.a -> .(.b -> (.c,.b))) ![.a] !u:[.c] !.b -> !(!u:[.c],!.b)