Required Type Arguments
summary
GHC gains a new extension that lets callers supply visible type arguments using a termlike syntax so APIs drop proxies and explicit type applications; a working example parses type-level format strings into a list of parts using the added ConSymbol/UnConSymbol type families and then builds a type-safe printf by expanding that list into function parameters. The feature is implemented (proposal 281) and usable today, enables examples like sizeOf T and showType T, and required parser and namespace fixes and deprecation warnings but runs in GHC.
AI-written summary · about
chapters (8)
- 0:00Required type arguments
- 3:21Type-safe printf example
- 8:17Invisible type variable problem
- 13:35Refining APIs with required type args
- 17:48Theoretical foundations
- 22:48Haskell pi types
- 24:56Implementation challenges
- 25:17Conclusion
related talks
01h 30mGHC Proposal Presentations
20mTowards Generic Type Checking Implementations in Haskell via Second-Order Abstract Syntax
20mGenerating Well-Typed Terms that are not "Useless"
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
31mTotal Type Classes
16mSyntax-Generic Operations, Reflectively Reified (Extended Abstract)
02h 50mIntro to Type Systems and Operational Semantics
25mStaging with Class: A Specification for Typed Template Haskell
