nponeccop/HNC

Optimization of comp.hn fails to substitute a formal parameter during inlining

Closed this issue · 2 comments

HN source:

ii x = {
    comp f g = {
        h x = f (g x)
        h
    }
    (comp incr incr) x
}

Expected result:

ii x = incr (incr x)

Actual result:

ii x = incr (g x)

Similar things happen to io2_intfunc.hn and euler6-2.hn. comp-2.hn is the smallest affected test case so far.

hn_tests/comp-2.hn is the smallest test case so far.

comp.hn works now. io2_intfunc.hn and euler6-2.hn don't. comp-2.hn I couldn't check

io2_intfunc.hn works now. comp-2.hn and euler6-2.hn don't work, but for a different reason. So closing as INVALID