Commit 50a74e44 authored by John van Groningen's avatar John van Groningen
Browse files

add missing alternatives in equal_strictness_lists and

move the function to module containers
parent b4928296
......@@ -235,15 +235,6 @@ where
compare strictness1 strictness2 comp_st
= (equal_strictness_lists strictness1 strictness2,comp_st)
equal_strictness_lists NotStrict NotStrict
= True
equal_strictness_lists NotStrict (Strict s)
= s==0
equal_strictness_lists (Strict s) NotStrict
= s==0
equal_strictness_lists (Strict s1) (Strict s2)
= s1==s2
instance compare AttributeVar
where
compare {av_info_ptr = dcl_info_ptr} {av_info_ptr = icl_info_ptr} comp_st=:{comp_attr_var_heap}
......
......@@ -32,8 +32,9 @@ first_n_strict :: !Int -> StrictnessList
insert_n_strictness_values_at_beginning :: !Int !StrictnessList -> StrictnessList
insert_n_lazy_values_at_beginning :: !Int !StrictnessList -> StrictnessList
arg_strictness_annotation :: !Int !StrictnessList -> Annotation;
is_not_strict :: !StrictnessList -> Bool
arg_is_strict :: !Int !StrictnessList -> Bool;
is_not_strict :: !StrictnessList -> Bool
equal_strictness_lists :: !StrictnessList !StrictnessList -> Bool
add_next_strict :: !Int !Int !StrictnessList -> (!Int,!Int,!StrictnessList)
add_next_not_strict :: !Int !Int !StrictnessList -> (!Int,!Int,!StrictnessList)
append_strictness :: !Int !StrictnessList -> StrictnessList
......
......@@ -286,6 +286,26 @@ is_not_strict NotStrict = True
is_not_strict (Strict s) = s==0
is_not_strict (StrictList s l) = s==0 && is_not_strict l
equal_strictness_lists :: !StrictnessList !StrictnessList -> Bool
equal_strictness_lists NotStrict NotStrict
= True
equal_strictness_lists NotStrict (Strict s)
= s==0
equal_strictness_lists NotStrict (StrictList s l)
= s==0 && is_not_strict l
equal_strictness_lists (Strict s) NotStrict
= s==0
equal_strictness_lists (Strict s1) (Strict s2)
= s1==s2
equal_strictness_lists (Strict s1) (StrictList s2 l)
= s1==s2 && is_not_strict l
equal_strictness_lists (StrictList s l) NotStrict
= s==0 && is_not_strict l
equal_strictness_lists (StrictList s1 l) (Strict s2)
= s1==s2 && is_not_strict l
equal_strictness_lists (StrictList s1 l1) (StrictList s2 l2)
= s1==s2 && equal_strictness_lists l1 l2
add_next_strict :: !Int !Int !StrictnessList -> (!Int,!Int,!StrictnessList)
add_next_strict strictness_index strictness strictness_list
| strictness_index<32
......
Markdown is supported
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