Remove name from `defNamed*Lambda`
Clarification and motivation
This feature is an improvement of morley#143 (closed).
The issue here that when you define a lambda using defNamed*Lambda
family of functions you have to pass lambda's name. This design was implemented as the simplest how you can distinguish different lambdas. Lambda name identifies its body and lambdas with the same name are considered to have the same body. But this design makes impossible to define a lambda that captures a Label label
from an outer scope (you can't pass the label to the lambda an argument). If you try to capture the label the result IndigoM
representing lambda body will diverge for two different labels, but the name of the lambda will be the same.
It makes impossible using lambdas with labels, however, functions with labels are often case, hence, functions and lambdas are not interchangeable that's bad.
So, I suggest just compare lambdas bodies and identify them with their bodies. After morley#187 (moved) is implemented this task becomes pretty easy.
Acceptance criteria
- Lambda tests are fixed and compile