Commit 0f66fdb9 authored by John van Groningen's avatar John van Groningen
Browse files

move mapSt2 and mapY2St from module check to module utilities

parent 12ff01e1
......@@ -603,28 +603,6 @@ where
= (list_of_specials, next_inst_index, all_instances, type_heaps, predef_symbols, error)
check_instance_specials mod_index fun_type fun_index SP_None next_inst_index all_instances type_heaps predef_symbols error
= (SP_None, next_inst_index, all_instances, type_heaps, predef_symbols,error)
mapSt2 f l s1 s2 :== map_st2 l s1 s2
where
map_st2 [x : xs] s1 s2
# (x, s1,s2) = f x s1 s2
(xs, s1,s2) = map_st2 xs s1 s2
#! s1 = s1
#! s2 = s2
= ([x : xs], s1,s2)
map_st2 [] s1 s2
= ([], s1,s2)
mapY2St f l s :== map_y2_st l s
where
map_y2_st [x : xs] s
# (x, y, s) = f x s
(xs, ys, s) = map_y2_st xs s
#! s = s
= ([x : xs], [y : ys], s)
map_y2_st [] s
#! s = s
= ([], [], s)
checkAndCollectTypesOfContextsOfSpecials :: [TypeContext] *PredefinedSymbols *ErrorAdmin -> (![[Type]],!*PredefinedSymbols,!*ErrorAdmin);
checkAndCollectTypesOfContextsOfSpecials type_contexts predef_symbols error
......
......@@ -37,6 +37,28 @@ where
#! s = s
= ([], s)
mapSt2 f l s1 s2 :== map_st2 l s1 s2
where
map_st2 [x : xs] s1 s2
# (x, s1,s2) = f x s1 s2
(xs, s1,s2) = map_st2 xs s1 s2
#! s1 = s1
#! s2 = s2
= ([x : xs], s1,s2)
map_st2 [] s1 s2
= ([], s1,s2)
mapY2St f l s :== map_y2_st l s
where
map_y2_st [x : xs] s
# (x, y, s) = f x s
(xs, ys, s) = map_y2_st xs s
#! s = s
= ([x : xs], [y : ys], s)
map_y2_st [] s
#! s = s
= ([], [], s)
map2St f l1 l2 st :== map2_st l1 l2 st
where
map2_st [h1:t1] [h2:t2] st
......
......@@ -140,6 +140,28 @@ where
#! s = s
= ([], s)
mapSt2 f l s1 s2 :== map_st2 l s1 s2
where
map_st2 [x : xs] s1 s2
# (x, s1,s2) = f x s1 s2
(xs, s1,s2) = map_st2 xs s1 s2
#! s1 = s1
#! s2 = s2
= ([x : xs], s1,s2)
map_st2 [] s1 s2
= ([], s1,s2)
mapY2St f l s :== map_y2_st l s
where
map_y2_st [x : xs] s
# (x, y, s) = f x s
(xs, ys, s) = map_y2_st xs s
#! s = s
= ([x : xs], [y : ys], s)
map_y2_st [] s
#! s = s
= ([], [], s)
map2St f l1 l2 st :== map2_st l1 l2 st
where
map2_st [h1:t1] [h2:t2] st
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment