~/talk

A Practical Introduction to Haskell GADTs

Talkat LambdaConf 2015 · 2015-05-22..05-24· [machine-learning]
links:none on file
slides:none on file

Claim: GADTs let the compiler assume different types in different pattern branches so invariants live in types, reducing unsafeCoerce. Workshop builds a simply typed Lambda interpreter ("Glam") and several exercises: singleton indices, heterogeneous lists indexed by promoted type-level lists, an Elem/LM index and an evaluator that typechecks. Uses GHC extensions (GADTs, DataKinds, ScopedTypeVariables), shows GADTs give branch-specific type info, explains need top-level type signatures for untouchable variables, demonstrates de Bruijn indices with the LM index trick, and notes a GHC warning/bug fixed around 7.12.

AI-written summary · about

  1. 0:00Introduction to GADTs
  2. 4:51GADT fundamentals
  3. 8:24First live GADT example
  4. 11:26Understanding type equality
  5. 14:03Syntax and alternative definitions
  6. 17:36Exercise: Defining GADTs
  7. 22:20Exercise solution review
  8. 25:36Deriving shows and constraints
  9. 28:12Type inference challenges
  10. 31:38Principled typing tradeoff
  11. 36:03Scoped type variables
  12. 38:05Higher rank types debate
  13. 42:03GHC bugs and warnings
  14. 45:43Heterogeneous lists
  15. 51:25Promoted data types
  16. 55:13Indexing into HLists
  17. 58:27Exercise solution: HList get
  18. 1:02:04Introduction to Glamda
  19. 1:05:28De Bruijn indices
  20. 1:07:58Expression data type
  21. 1:11:51Type-safe evaluation
  22. 1:15:32Final takeaways and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.