Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Fri 28 Sep 2018 14:30 - 15:00 at Illinois Central - Session 6 Chair(s): Brent Yorgey

Type classes are one of Haskell's most popular features and extend its type system with ad-hoc polymorphism. Since their conception, there were useful features that could not be offered because of the desire to offer two correctness properties: coherence and global uniqueness of instances. Coherence essentially guarantees that program semantics are independent from type-checker internals. Global uniqueness of instances is relied upon by libraries for enforcing, for example, that a single order relation is used for all manipulations of an ordered binary tree.

The features that could not be offered include explicit dictionary application and local instances, which would be highly useful in practice. In this paper, we propose a new design for offering explicit dictionary application, without compromising coherence and global uniqueness. We introduce a novel criterion based on GHC's type argument roles to decide when a dictionary application is safe with respect to global uniqueness of instances. We preserve coherence by detecting potential sources of incoherence, and prove it formally. Moreover, our solution makes it possible to use local dictionaries. In addition to developing our ideas formally, we have implemented a working prototype in GHC.

Fri 28 Sep
Times are displayed in time zone: Guadalajara, Mexico City, Monterrey change

13:30 - 15:00: Session 6Haskell at Illinois Central
Chair(s): Brent YorgeyHendrix College
13:30 - 14:00
A Promise Checked Is a Promise Kept: Inspection Testing
Joachim BreitnerDFINITY Foundation
14:00 - 14:30
Branching Processes for QuickCheck Generators
Agustín MistaUniversidad Nacional de Rosario, Argentina, Alejandro RussoChalmers University of Technology, Sweden, John HughesChalmers University of Technology, Sweden
14:30 - 15:00
Coherent Explicit Dictionary Application for Haskell
Thomas WinantKU Leuven, Belgium, Dominique DevrieseVrije Universiteit Brussel, Belgium
DOI File Attached