nponeccop / HNC

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

Optimization of udp_socket0.hn fails to eta-reduce and inline f #49

Closed nponeccop closed 9 years ago

nponeccop commented 11 years ago

HN source:

hnMain = {
    x = udp_connect "localhost" 99
    f x = print x
    bind (udp_receive x) f
}

Expected result:

hnMain = bind (udp_receive (udp_connect "localhost" 99)) print

Actual result:

hnMain = {
    f x = print x
    bind (udp_receive (udp_connect "localhost" 99)) f
}
nponeccop commented 9 years ago

Duplicate of #51