What is Nostr?
Raito Bezarius /
npub1t2c…5ty4
2024-12-20 16:13:15
in reply to nevent1q…xrkw

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`.
Author Public Key
npub1t2c07cksmsemlfwr8qxej8n9pexz3w2f7m2jfch0wurgar4lxl2shw5ty4