Controlling Effect Rows in Purescript Public APIs
Effect row inference in Purescript can silently generalize side‑effects. This post shows how explicit annotations restore control, with a concrete example and compile‑time verification.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Effect row inference in Purescript can silently generalize side‑effects. This post shows how explicit annotations restore control, with a concrete example and compile‑time verification.
PureScript's Eff monad and effect rows were removed in 0.12. Here's how the current Effect and Aff model works, with a working example and honest trade-offs.
A practical guide to PureScript's built-in row polymorphism for type-safe, flexible record handling—covering open rows, Lacks constraints, row merge, and generic JSON encoding.
PureScript's row polymorphism lets functions accept any record containing at least the fields they need — no interfaces or wrappers. A worked example, the Cons/Union machinery, and the pitfalls.
Step‑by‑step guide to diagnose and fix PureScript FFI runtime errors such as 'Foreign import failed' by checking annotations, exports, arity, and bundle inclusion.
Learn how PureScript’s row‑polymorphic extensible records let you accept varied record shapes without duplicating types, with a concrete example and trade‑offs.
Learn how to define a custom logging effect in PureScript, integrate it with the Eff monad, and compose it with other effects using effect‑row polymorphism.
A decision guide for choosing PureScript's Aff monad versus Effect monad for asynchronous programming, with a comparison table, trade‑off explanation, and concrete code examples.
Learn how PureScript’s FFI lets you call JavaScript functions with type‑safe contracts, see a worked sqrt example, and understand the limits and verification steps.