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
Examples: extend interop cookbook with effects (pathlib, requests)
Two entries centered on inferred effects — Pyfun's differentiator:
- read_files (pathlib): offline-runnable io-effect showcase; effect
inference + propagation, the `let pure` rejection as the guarantee, and
try→Result on a missing file.
- http_fetch (requests/httpx): check-valid effects/async entry (needs
requests + network to run); io from requests.get, `->{async}` for httpx,
and the compile-time effect guarantee.
Building these dogfooded four extern-FFI reach gaps (submodule imports,
nullary calls, builtin-type dotted targets, property access) — documented
in the cookbook README's limits and added as a consolidated ROADMAP item.
All offline examples run end-to-end; http_fetch pyfun-checks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|[`json_to_adt.pyfun`](./json_to_adt.pyfun)|`json` (stdlib) |**the headline** — decode a heterogeneous object into your own record, totally, via `result {}` railway composition (KeyError/ValueError → `Error`) |
|[`json_to_adt.pyfun`](./json_to_adt.pyfun)|`json` (stdlib) | ✅ |**the headline** — decode a heterogeneous object into your own record, totally, via `result {}` railway composition (KeyError/ValueError → `Error`) |
|[`http_fetch.pyfun`](./http_fetch.pyfun)|`requests`/`httpx`| check-only | inferred `io` / `->{async}` effects; the effect *guarantee* (`let pure` over `io` is a compile error) |
38
40
39
41
## Reusable patterns (all verified against the current compiler)
0 commit comments