~/talk

GADTs in Dotty

Talkat Typelevel Summit Lausanne 2019 · on Friday, 2019-06-14· [scala]
links:none on file
slides:none on file

Dotty implements GADTs that actually refine types on pattern match, preventing runtime casts: an expr evaluator returns the precise type after matching, length-indexed vectors enforce equal lengths for zip, and an EQ GADT proves type equalities. The compiler infers type constraints by upcasting scrutiny and patterns, rejecting impossible branches and handling unions, final types and variance. Dotty uniquely supports covariant GADTs and integrates with match types, fixing Scala 2 and Haskell limitations and making these checks compile-time reliable.

AI-written summary · about

  1. 0:00Start
  2. 6:04List with type-level length
  3. 13:40Interesting covariant GADT: SUB
  4. 14:33Constraints from normal classes
  5. 23:12Back to invariance
  6. 24:52And a final detail
~/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.