Implicit parameters
Top Cited Papers
- 5 January 2000
- proceedings article
- Published by Association for Computing Machinery (ACM)
- p. 108-118
- https://doi.org/10.1145/325694.325708
Abstract
This paper introduces a language feature, called implicit parameters, that provides dynamically scoped variables within a statically-typed Hindley-Milner framework. Implicit parameters are lexically distinct from regular identifiers, and are bound by a special with construct whose scope is dynamic, rather than static as with let. Implicit parameters are treated by the type system as parameters that are not explicitly declared, but are inferred from their use.We present implicit parameters within a small call-by-name &lgr;-calculus. We give a type system, a type inference algorithm, and several semantics. We also explore implicit parameters in the wider settings of call-by-need languages with overloading, and call-by-value languages with effects. As a witness to the former, we have implemented implicit parameters as an extension of Haskell within the Hugs interpreter, which we use to present several motivating examples.Keywords
This publication has 7 references indexed in Scilit:
- The Definition of Standard MLPublished by MIT Press ,1997
- Structuring depth-first search algorithms in HaskellPublished by Association for Computing Machinery (ACM) ,1995
- A second look at overloadingPublished by Association for Computing Machinery (ACM) ,1995
- Qualified TypesPublished by Cambridge University Press (CUP) ,1994
- The typed polymorphic label-selective λ-calculusPublished by Association for Computing Machinery (ACM) ,1994
- Type checking records and variants in a natural extension of MLPublished by Association for Computing Machinery (ACM) ,1989
- How to make ad-hoc polymorphism less ad hocPublished by Association for Computing Machinery (ACM) ,1989