Introduction to FP Using Haskell (Part 2)
summary
Defines concrete algebraic types like OneOrTwo a, a recursive Natural and a custom List and shows actual GHCi commands (including :info) using Glasgow Haskell Compiler 7.8+. Demonstrates type inference and scoped type variables, pattern matching (non‑overlapping vs overlapping), writes a recursive add for Natural that computes correctly, implements an Ord instance for Natural so max3 works, and explores fixity/cons behavior and Show/deriving versus manual instances.
AI-written summary · about
chapters (6)
- 0:00Understanding type inference
- 4:21Algebraic data types
- 9:26Functions and pattern matching
- 16:44Recursive data types
- 24:12Type classes and instances
- 37:15Lists and operator fixity
related talks
01h 20mA Practical Introduction to Haskell GADTs
51mPragmatism, Puritanism and Functional Programming
02h 28mIsomorphic Reasoning: Counting with Types Part 2
01h 52mIsomorphic Reasoning: Counting with Types Part 3
01h 39mIsomorphic Reasoning: Counting with Types Part 1
44mFunctional Programming: Failed Successfully
40mThe Origins of Free
01h 47mAgda from Nothing: Order in the Types
