[TM-341] Fix annotation extraction when parameter has lambda arguments
Description
Problem : It seems that the generic implementation errors out when the parameter have Lambda
in them, seemingly due to a lack of generic instance for Lambda
.
Solution:
Special case Lambda values in the type annotation extraction code. In addition to this, it was noticed that we had earlier removed the similar special case for Maybe
and instead made Maybe
values to be considered as a primitive value by modifying IsPrimitiveValue
type family. This is reverted also as this prevents us from reading field names from values that are wrapped in a maybe (/cc @Martoon)
Tests: Tests were added/modified that check the type annotation generation when there are lambda values in parameter, and also checked for annotations for named fields wrapped in a Maybe.
Related issue(s)
https://issues.serokell.io/issue/TM-341
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.