Making Implicit Parameters Explicit

Ehc

Making Implicit Parameters Explicit

  • Atze Dijkstra, S. Doaitse Swierstra, 2005
  • rejected by POPL 2006, available as technical report
  • Abstract: In almost all languages all arguments to functions are to be given explicitly. The Haskell class system however is an exception: functions can have class predicates as part of their type signature, and dictionaries are implicitly constructed and implicitly passed for such predicates, thus relieving the programmer from a lot of clerical work and removing clutter from the program text. Unfortunately Haskell maintains a very strict boundary between the implicit and the explicit world; if the implicit mechanisms fail to construct the hidden dictionaries there is no way the programmer can provide help, nor is he able to override the choices made by the implicit mechanisms. In this paper we describe, in the context of Haskell, a mechanism that allows the programmer to explicitly construct implicit arguments. This extension blends well with existing resolution mechanisms, since it only overrides the default behavior. We include a description of the use of partial type signatures, which liberates the programmer from having to choose between specifying a complete type signature or no type signature at all. Finally we show how the system can easily be extended to deal with higher-order predicates, thus enabling the elegant formulation of some forms of generic programming.

-- AtzeDijkstra - 21 Sep 2007

Topic attachments
I Attachment Action Size Date Who Comment
pdfpdf 20050718-2337-popl06-explimpl.pdf manage 179.1 K 21 Sep 2007 - 09:44 AtzeDijkstra