nponeccop / HNC

HN Compiler
GNU Lesser General Public License v3.0
62 stars 5 forks source link

Optimization of t2_identifier.hn fails to eta-reduce and inline t2 #51

Closed nponeccop closed 9 years ago

nponeccop commented 11 years ago

HN source:

hnMain = {
    t2 x = print x
    bind readnum t2
}

Actual result: same as source

Expected result:

hnMain = bind readnum print
nponeccop commented 9 years ago

Similar problems happen to

isDigit.hn, allDigits.hn, allDigits-ho.hn, allDigits-ho-1.hn, euler1.hn, euler6-1.hn.

nponeccop commented 9 years ago

t2_identifier.hn and udp_socket0.hn work now, and the 6 mentioned files (isDigit etc) fail for a different reason.