~/talk

How to use Phantom Types and Existential Types in Production

Talkat LambdaConf 2020 Global Edition · on Tuesday, 2020-06-23· [typescript]
slides:none on file

Shows concrete Haskell code (repo linked) that parses gauge readings, validates them and carries that validation as types: phantom types attach proofs to types; demonstrates non-empty lists, newtypes, and the refined library to express conjunctive predicates. Uses existentials to hide internal pure state while letting IO pass it back: existentials hide pure state from IO. Builds examples: merged redundant gauges, object‑style plugins via existentials, and type‑aligned sequences to enforce launch‑state transitions at compile time.

AI-written summary · about

  1. 0:00Start
  2. 13:09Downstream Code
  3. 15:06Make Data Correct by Construction
  4. 23:55Phantom Types
  5. 34:01Useful Papers on Phantoms
  6. 38:33Define an Existential Type
  7. 43:36Object-Oriented Programming
  8. 49:09Type Aligned Sequences
  9. 51:35Hiding Intermediate Variables
~/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.