~/talk

Type Narrowing the Hard Way

Talkat WITS 2026 · on Saturday, 2026-01-17· [compilers-and-language-design]
links:none on file
links:none on file
slides:none on file

A litmus-suite called the if t benchmark runs on eight real typecheckers and shows everyone handles basic narrowing but disagree widely on harder cases; set-theoretic types give a neat declarative spec (slow or tricky for singletons like “even”), while the pragmatic common approach is a syntactic meta-function tacked onto if rules. The implemented occurrence typing (Typed Racket, Typed Clojure) is compositional and catches lying predicates but complicates the checker and produces hard-to-read errors; a property-based generator is under development to find predicate unsoundness.

AI-written summary · about

  1. 0:00Type narrowing introduction
  2. 1:04Why type narrowing matters
  3. 3:08Basic narrowing examples
  4. 4:32Higher-order narrowing with filter
  5. 5:54Introducing ift benchmark
  6. 8:19Easy narrowing implementation
  7. 11:50Beautiful narrowing with set types
  8. 16:20Hard way with occurrence typing
  9. 19:48Occurrence typing challenges
  10. 20:30Testing predicates with PBT
  11. 21:13Q&A
~/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.