Your PureScript FFI Types Are Unchecked Assertions
PureScript's foreign import lets you call JavaScript with typed signatures, but the compiler never inspects the JS body. Learn how to treat FFI as an untrusted boundary and validate at the edges.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
PureScript's foreign import lets you call JavaScript with typed signatures, but the compiler never inspects the JS body. Learn how to treat FFI as an untrusted boundary and validate at the edges.
PureScript’s Foreign Function Interface lets you call JavaScript from pure code. This post walks through declaring imports, writing the JS side, bundling, and testing the boundary—plus the trade‑offs you should know.
Learn how to isolate side effects and enforce data boundaries using PureScript's Aff monad and Effect system to build predictable, functional frontend architectures.
Learn how to write a function that accepts any record with at least a name field using PureScript’s row‑polymorphic types, see a concrete example, and understand common pitfalls.
PureScript's row polymorphism lets you write functions that accept any record with a required set of fields, preserving extra fields automatically. This blog shows a concrete updateName utility, explains the trade-offs, and gives a verification step you can run today.
Learn how PureScript’s row‑polymorphic extensible records let UI components require specific props while accepting extra fields, giving both flexibility and compile‑time safety.
A decision guide for PureScript developers: use Effect for immediate synchronous side‑effects and Aff for cancellable asynchronous work. Includes constraints, a comparison table, trade‑offs, and a runnable code example with build steps.
Learn how PureScript’s row polymorphism lets you write functions that accept any record with the required fields, and how lenses extend this idea to nested data.
Learn how to safely bridge PureScript and JavaScript using Maybe types and effect types to maintain type safety when calling foreign functions.