A Hands on Tutorial to Generic Programming in Haskell (Part 1)
summary
Shows how Haskell’s built‑in GHC generics actually work: the U1/K1/:+:/:× building blocks, how to write/from conversions, and how GHC can auto‑derive Generic so the examples compile. Walks through a concrete pet/fish/dog datatype, prints the generated rep with metadata, and implements a working generic equality instance. Exposes practical limits (one‑level depth, Generic vs Generic1, generics‑sop) and compiles live code.
AI-written summary · about
chapters (6)
- 0:00Start
- 4:34Functors
- 11:57Public Service Announcement
- 18:10Generic Conversion Function
- 25:35Metadata
- 31:35Define Generic Equality
related talks
01h 20mA Practical Introduction to Haskell GADTs
52mCategory-parametric Programming
51mPragmatism, Puritanism and Functional Programming
01h 52mIsomorphic Reasoning: Counting with Types Part 3
02h 28mIsomorphic Reasoning: Counting with Types Part 2
01h 15mA Crash Course in Category Theory
45mA practical introduction to Category Theory
01h 39mIsomorphic Reasoning: Counting with Types Part 1
