Prism: An Impure Functional Language with Typed Effects
The article introduces Prism, a research language designed as an alternative to Haskell and Rust for large-scale systems. It features an impure functional design with a monadic effect system, built-in parallel and distributed computation support, and a focus on ergonomic tooling including language servers and debuggers for practical use.
Background
- Stephen Diehl is a well-known engineer and writer in the Haskell/functional programming community, author of several widely-read technical blogs and books on compilers and typed functional programming.
- "Prism" is an experimental programming language he designed to explore typed effect systems — a way to track side effects (e.g., I/O, state, exceptions) in a program's type signature, extending ideas from Haskell's monads and from research languages like Koka and Frank.
- The post outlines Prism's design: it combines pure functional core semantics (like Haskell) with an effect system that lets programmers annotate where impure operations happen, without needing monads for every effect.
- This matters because it sits at the intersection of two active research areas: algebraic effects (which are gaining traction in languages like OCaml, Unison, and upcoming Haskell GHC proposals) and practical compiler implementation, showing how a full language with effects can be built from scratch.