Parameters of Many Flavors
summary
Argument that Haskell already supports most dependent-style parameters is demonstrated with concrete code: GHC 9.0 adds linear/multiplicity, Typeable/typable workaround is used to get relevant dependent arguments at runtime (ugly but functional), and Idris shows concise relevant quantification. Examples include a working length-indexed replicate and an id that maps True to False when the type is inspected. Missing pieces: built-in visible dependent quantification and nicer syntax—proposed ideas include for each quantifier proposal and using multiplicities.
AI-written summary · about
chapters (10)
- 0:00Introduction and welcome
- 1:51What is a parameter
- 4:58Three flavors of parameters
- 8:04Relevance and irrelevance
- 11:57Relevant dependent quantification
- 17:15Visible dependent quantification
- 20:48Filling the parameter table
- 24:42Irrelevant parameters
- 25:45Linear types and multiplicity
- 29:41Future syntax and conclusions
