kayuri/HNC — Issue #8: Optimization of const.hn fails to inline f
Author: nponeccop
Created: 2011-10-08 12:06:23+00:00
State: open

# Optimization of const.hn fails to inline f

Note that functions cannot be inlined if they are passed as arguments. In the following code `f` cannot be inlined:

x y = {
f x = 5
map f y
}

# Source code (const.hn)

hnMain = {
f x = 5
print (f 5)
}

# Expected result

hnMain = print 5

# Actual result

Same as source

# Where to look

See `HN.Optimizer.Inliner2.rewriteExpression` and its descendants.