Into the Core Squeezing Haskell into nine Constructors
summary
GHC Core is a tiny explicitly-typed intermediate language (about nine expression constructors) where explicit types on every binder and System F big-lambdas and type applications make typechecking trivial and reliable. The simplifier relies on aggressive inlining plus an occurrence analyzer to avoid code bloat, guided by size/cheapness heuristics and interface (.hi) unfoldings for cross-module inlining. Rewrite rules implement specialization (num dictionaries turn into direct ops), and join points as tail-call jumps convert duplicated continuations into efficient stack-adjust-and-jump code.
AI-written summary · about
chapters (16)
- 0:00Start
- 0:11Simon Payton Jones
- 15:16Beta Reduction
- 17:58How Is Big Lambda Different from Type Applications
- 23:00Case Alternatives
- 26:02Why Do We Need a Default Case in Case Expressions
- 32:49Type Inference
- 37:33Optimizations
- 40:25Insights of the Simplifier
- 41:10What Happens inside the Simplifier
- 45:07Occurrence Analyzer
- 52:33Rewrite Rules
- 53:38Rewrite Rules in the Source Code
- 1:07:01Matching Calls
- 1:13:08Join Points
- 1:22:57Point Transformations
related talks
01h 38mGHC Core Optimisations
01h 07mBuilding a Dependently Typed Language in Haskell Part 1
23mPartial Type Constructors in Practice
01h 35mSecrets of the GHC Typechecker in 100 Type Declarations
01h 04mHaskell - A Peek Inside the Ivory Tower
01h 22mHaskell for Everyday Programmers
36mFlexible Instruction-Set Semantics via Abstract Monads
36mWorking Hard to Keep Things Lazy
