u/Segeljaktusin r/ProgrammingLanguages • Recommends
On “Useful resources for writing a type checker”
#hindley-milner#algorithmw#typeinference
5.6K subscribers • 3 videos on Hallway
Intermediate. Assumes working knowledge.
9.9K views7 years ago2 recommendations
Programming languagesComputer scienceLanguage design and type systemsCompilers and interpretersFunctional programming
Christoph Hegemann explains the fundamentals of the Hindley-Milner-Damas type system and implements Algorithm W in Haskell.
Static typing is experiencing a renaissance. Modern languages use type inference that lets you just write your expressions and have the compiler infer their types. But how does this work? I'll show you the fundamentals and theory by implementing a fully functional type checker/type inferencer. This talk will attempt to disenchant type systems/checker as something magic and show how they are normal (fun) programs. To do so it will present the Hindley-Milner-Damas type system which forms the basis for languages like OCaml, Haskell, PureScript, or Elm (and lots more). We'll implement Algorithm W, a type inference algorithm, for it in about a 100 lines of Haskell. Participants will leave with an understanding of typing judgements and terminology like substitution, instantiation, and unification.What people say. Highly recommended as an easy-to-digest tutorial for implementing Hindley-Milner type inference from scratch.
u/Segeljaktusin r/ProgrammingLanguages • Recommends
On “Useful resources for writing a type checker”
u/superstar64in r/ProgrammingLanguages • Recommends
On “HM types and type schemes”
u/superstar64in r/ProgrammingLanguages • Recommends
On “Does anyone know of resources or languages which involve inferring types from function behavior?”
u/superstar64in r/ProgrammingLanguages • Recommends
On “Considering language redesign, criticism requested”
u/superstar64in r/ProgrammingLanguages • Recommends
On “Writing a typechecker”