More aggressive optimizations for lambdas
In https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/-/merge_requests/387 I noticed that writing \_ k -> key == k
was faster than const ((==) key)
. This is even the case if const
were a macro.
Is it possible to fill in arguments of lambdas when they are already known? For example, I would expect to see the same code generated for these two Start rules:
Start = ((\x _ -> x) ((==) 0)) () 1
Start = (\_ -> (==) 0) () 1