Add __name__ to the "constant" callable in Reader

Without it, the __repr__ of Reader may fail
This commit is contained in:
Correl Roush 2019-01-08 15:31:58 -05:00
parent 3d312c1c90
commit 319ac3cb4d

View file

@ -27,6 +27,7 @@ class Reader(Monad[T], Generic[Env, T]):
# Update the signature's return annotation to reflect the
# concrete type of the wrapped value.
__name__ = "constant"
__signature__ = inspect.Signature(
[
inspect.Parameter(