- Author
- Gabriella Gonzalez
- Published
- 23 June 2026
- Kind
- Personal blog post, introductory tutorial with Haskell code
- Original
- haskellforall.com/2026/06/record-type-inference-for-dummies
- Subject
- Programming languages and types
What it is
Gabriella Gonzalez writes the Haskell for all blog. This is an introductory post meant to prepare readers for a more advanced one. It explains anonymous records, then the inference rules for them.
What it says
- The post argues weak record inference holds back statically typed languages.
- It builds a small language with records, field access and variables, with Haskell code.
- Field access must check the record's inferred type, not its value, once variables exist.
- Extra fields can use subtyping, as in TypeScript, or row polymorphism, as in PureScript.
- Row polymorphism names the extra fields, so a type can say they stay the same.
- The TypeScript version of a record extension function needs a clumsier type.
What evidence it gives
The post gives inference rules in type theory notation. It pairs each rule with Haskell code and checks examples in the Haskell REPL. A full program appears in the appendix. The function and row polymorphism parts have no Haskell code, only reasoning.
Interests and limits
The author is building a type checker for Nix, so has a stake. The post is a tutorial, so it tests nothing against real programs. It stops before record concatenation, which a later post covers.