Seriously, The Haskell Type Checker is Your Friend
summary
Live walkthrough of real GHC errors with concrete fixes: use GHC 8.2.2 and GHCi to reproduce parse, definition and type errors; fix module/pragma order and indentation, rename main or change its IO vs Int signature, import Data.Maybe/Data.List to bring Maybe and sort into scope, correct use of data constructors (Just vs Maybe) and arity, and implement Peano naturals and enumerateFromTo with proper recursion and successor so the compiler’s reported expected vs actual types match.
AI-written summary · about
chapters (11)
- 0:00Start
- 5:30Parse Errors
- 7:59Indentation Rules
- 9:37Parse Error Possibly Incorrect Indentation or Mismatched Brackets
- 15:11Definition and Type Errors
- 15:30Definition Error
- 21:37Type Mismatch
- 24:55Not Enough Arguments
- 25:20Type Ordering
- 25:57Successor Function
- 27:57Background
related talks
29mType Inference Techniques: Implementation and Formalization, Better Together
23mError Message Annotation Plugins for Haskell
24mLet the Scala compiler work for you
42mSuggesting Valid Substitutions For Typed Holes
01h 39mModeling Data in Haskell for Beginners
23mThe GHC Debugger
25mIncremental Type-Checking for Free: Using Scope Graphs to Derive Incremental Type-Checkers
25m"Compiler-Driven Development: Making Rust Work for You"
