You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to somehow make our pointfree and other helper functions trully generic.
Currently we have a hardcoded set of containers that each of these functions support.
It is not a scallable solution.
Let's say I want to create a new monad called Example[T] extends Monad[T].
It works just fine! Now, what about using bind() pointfree function? It will work in runtime, but fail during the type-checking.
Because it is defined using overloads and is hardcoded.
The problem is that HKT functions are not supported. And possibly won't be supported anytime soon (unless get_function_sig_hook will be released).
I suggest to rewrite it as follows (let's start with the contract definition):
Activity
sobolevn commentedon Jul 5, 2020
Implementation notes:
@bind.negotiateshould not have body, can we check that?@overloadlooks like it does something like that@bind.negotiatemust be typechecked with the@contractdefinition. But, not the regular OOP way (sorry, Liskov)Related #446 #408
sobolevn commentedon Jul 12, 2020
Done by #446