Towards better implicit parameters
summary
Proposal introduces Scoped values: dynamic-scoped keys become nominal data types, introduced only with a new with-value primitive and read via a value function; a prototype desugars to Core using a value type family and wired-in identifiers so the innermost binding wins. It avoids global instances and fixes monomorphism-restriction capture, but requires a new constraint kind and compiler plumbing and raises integration questions with existing IP and non-singleton classes.
AI-written summary · about
chapters (7)
- 0:00Implicit parameters motivation
- 3:17Problems with implicit params in GHC
- 7:28withDict feature intro
- 12:29Scoped values and non-singleton classes
- 16:46Open questions and future work
- 17:06Audience questions and discussion
- 22:08Monomorphism restriction Q&A
related talks
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
31mRethinking the Value Restriction
28mSemi-explicit polymorphic parameters
43mAdding kind-polymorphism to the Scala programming language
15mElaboration with First-Class Implicit Function Types
05mFunctional Programming without the Functions
46mAdding kind-polymorphism to the Scala programming language
30mDotty and types: the story so far
