Why Functional Programming with Linear Types Matters
summary
GHC 9.0 adds retrofitted linear types and a rio monad (linear-base) that track usages to enforce resource safety: sockets must be used exactly once so forgotten closes (a bug that survived two years in a production genneti-like client) and use-after-close are compile errors. The system integrates with JNI local/global refs to avoid cross-heap dangling pointers, targets low tail latency in 93-parallel-request scenarios, and supports explicit secondary heaps for high-throughput, exascale workloads.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 8:59Latency
- 15:20Network Services
- 19:00Socket
- 21:57ResourceT
- 23:24ResourceT Example
- 24:05Sockets
- 24:46Reusing old sockets
- 25:43Annotations
- 28:26modularity
- 29:23high performance language interop
- 30:36big code bases
- 31:44garbage collected languages
- 34:57finalizer
- 36:03stream
- 36:53stream extraction
- 40:18Resource leaks
- 41:30Latency spikes
- 42:53Longlived heap
- 43:57Why Haskell
- 48:07Summary
- 50:26Why cant Rio just replace IO
- 52:52Will these ideas make it into other mainstream languages
- 54:47Future work in linear types
- 57:50Haskell for real time applications
related talks
01h 04mHaskell - A Peek Inside the Ivory Tower
49mMaking sense of the Haskell type system
01h 22mHaskell for Everyday Programmers
34mPrinciples of functional programming with examples in Java and Haskell
40mWhat Haskell taught us when we were not looking
01h 04mNot-So-Boring Haskell
01h 02mHaskell for Java Programmers
36mGHC Status Report
