Raito Bezarius on Nostr: nprofile1q…h7ucx lib.types.functionTo X We have the type for ? → X but not the ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq7xkgpdpy5aperha7elprzgej0vpzhc0ma80fn96re3zqjpv286rqkh7ucx (nprofile…7ucx) lib.types.functionTo X
We have the type for ? → X but not the type for A → B.
We also have lib.types.coercedTo X inj Y so that you can do ? → X → Y where the last arrow is done via `inj`.
lib.types.functionTo (lib.types.coercedTo X inj Y) for example is possible.
Source typing is not done currently because Nix is lazy so you cannot know that you are failing the type _until_ you call for the first time the function and by then it's too late.
Source typing should be baked as `assert`.
We have the type for ? → X but not the type for A → B.
We also have lib.types.coercedTo X inj Y so that you can do ? → X → Y where the last arrow is done via `inj`.
lib.types.functionTo (lib.types.coercedTo X inj Y) for example is possible.
Source typing is not done currently because Nix is lazy so you cannot know that you are failing the type _until_ you call for the first time the function and by then it's too late.
Source typing should be baked as `assert`.