Commit e5d0d070 authored by John van Groningen's avatar John van Groningen
Browse files

bug fix: add code for TLifted in clean_up_arg_type (for lifted existential variables)

parent 6194a536
......@@ -398,7 +398,7 @@ where
= ({ at & at_type = TFAC avars type contexts, at_attribute = at_attribute}, (all_exi_vars, cus))
= ({ at & at_type = TFAC avars type contexts, at_attribute = at_attribute},
(all_exi_vars, {cus & cus_error = existentialError cus.cus_error, cus_exis_vars = []}))
clean_up_arg_type cui at (all_exi_vars, cus)
clean_up_arg_type cui=:{cui_top_level} at (all_exi_vars, cus)
# (at, cus) = clean_up cui at cus
(cus_exis_vars, cus) = cus!cus_exis_vars
| isEmpty cus_exis_vars
......@@ -407,8 +407,8 @@ where
= ({ at & at_type = TFA new_exi_vars at.at_type }, (all_exi_vars, {cus & cus_exis_vars = []}))
where
check_existential_var (var_number,var_attr) (exi_vars, all_vars, cus)
# (type, cus) = cus!cus_var_env.[var_number]
| isMember var_number all_vars
# (type, cus) = cus!cus_var_env.[var_number]
= case type of
TE
-> (exi_vars, all_vars, cus)
......@@ -416,9 +416,15 @@ where
# (TV var, cus) = cus!cus_var_env.[var_number]
-> ([{atv_attribute = var_attr, atv_variable = var } : exi_vars ], all_vars,
{cus & cus_var_env = {cus.cus_var_env & [var_number] = TE }, cus_error = existentialError cus.cus_error })
# (TV var, cus) = cus!cus_var_env.[var_number]
= ([{atv_attribute = var_attr, atv_variable = var } : exi_vars ],
[var_number : all_vars], {cus & cus_var_env = {cus.cus_var_env & [var_number] = TE}})
# all_vars = [var_number : all_vars]
= case type of
TV var
-> ([{atv_attribute=var_attr, atv_variable=var} : exi_vars], all_vars, {cus & cus_var_env.[var_number] = TE})
TLifted var
| cui_top_level
# cus = {cus & cus_error = liftedError var cus.cus_error, cus_var_env.[var_number] = TE}
-> ([{atv_attribute=var_attr, atv_variable=var} : exi_vars], all_vars, cus)
-> ([{atv_attribute=var_attr, atv_variable=var} : exi_vars], all_vars, {cus & cus_var_env.[var_number] = TE})
clean_up_result_type cui at cus
# (at, cus=:{cus_exis_vars}) = clean_up cui at cus
......@@ -1847,7 +1853,7 @@ optBeautifulizeIdent id_name
= "comprehension"
| prefix.[0] == 'g'
= "generator"
prefix_to_readable_name _ = abort "fatal error 21 in typesupport.icl"
prefix_to_readable_name _ = abort "fatal error in optBeautifulizeIdent in typesupport"
// search for an element in an array
searchlArrElt p s i
......
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