Purescript on the BEAM; Typed OTP for greatness
summary
Company codebase hits >250k lines so they adopt Purescript frontends (Halogen) and compile to BEAM with the Purerl compiler, hire its author, and ship two products plus some OSS libraries. Examples show typed supervisors and gen_server callbacks compiled from Purescript, a two‑stage PSC->Erlang->BEAM build under rebar3, hot loading working, and real FFI to call Erlang libs. Limits include awkward Erlang type mapping, deciding error semantics, and opaque types plus FFI effects to wrap side effects.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:51The frontend journey
- 3:51Large code base
- 4:45Nick
- 5:22We hired Nick
- 5:43Wipe your scripts
- 6:03Free stuff
- 6:30Package set
- 7:26Sales pitch comparison
- 11:12Purescript is a nobrainer
- 11:24Purescript demo
- 14:11Main
- 15:24Function
- 17:17Beans
- 18:27Base64 encode strings
- 24:32Demo
- 27:47Legacy code
- 29:52Pony
- 34:02Side effects
- 37:02Checking the code
- 40:27Handling errors
- 43:25OTP example








