Commit f8d61ae7 authored by Martin Wierich's avatar Martin Wierich
Browse files

Added just a comment (beginning with "XXX") that indicates a change that has to be made

to solve the following bug:

f
  # x = undef
  #! y = x
  | True
    = 2
  = y

After checking this will be like

f
  # x = undef
  | True
    = 2
  = x

To really solve this bug we have to invent something new, because aliases
like (#! y = x) are _not_ allowed. We could either introduce a dummy identity function:

f
  # x = undef
  #! y = dummy_id x
  | True
    = 2
  = y

or we could introduce constructs like

f
  # x = undef
  #! y
  | True
    = 2
  = y
parent e014c886
......@@ -1200,6 +1200,7 @@ where
= (expr @ exprs, free_vars, cos)
collectVariables (Let lad=:{let_strict_binds, let_lazy_binds, let_expr}) free_vars cos=:{cos_var_heap}
# cos_var_heap = determine_aliases let_strict_binds cos_var_heap
// XXX: # cos_var_heap = foldSt (\bind cos_var_heap->clearCount bind cIsALocalVar cos_var_heap) let_strict_binds cos_var_heap
# cos_var_heap = determine_aliases let_lazy_binds cos_var_heap
(is_cyclic_s, let_strict_binds, cos_var_heap) = detect_cycles_and_remove_alias_binds let_strict_binds cos_var_heap
(is_cyclic_l, let_lazy_binds, cos_var_heap) = detect_cycles_and_remove_alias_binds let_lazy_binds cos_var_heap
......
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