Literal types what they are good for
summary
New syntax for Scala 2.13 exposes literal/singleton types so code can require the exact value 42 or a hard‑coded SQL fragment. The talk shows using refined to encode port ranges and regexes as types with runtime parsers from atto, and using singleton-ops plus a safe string typeclass and macros to concatenate literal strings at compile time. A prototype SQL DSL encodes schema as implicit literal‑typed columns and produces compiler errors when a selected column or type is missing.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:45Agenda
- 5:58Jumping from the Type Level to the Value Level
- 7:06Refinement Types
- 9:54Type Safety
- 13:43Concatenate Literal Types
- 22:39Derivation of Column Decoder
- 26:43How Normal Implicit Implicit Errors Works
related talks
49mType level Programming in Scala
24mLet the Scala compiler work for you
31mGoing structural with Named Tuples
32mSingle Serving Values with Linear Types in Scala
45mTypelevel Programming 101: The Subspace of Scala
32mUnderstanding the Type System of Scala 3
47mIdris For (Im)practical Scala Programmers
38mExistential Types — Make OOP Great Again!
