Home
Scholarly Works
A language feature to unbundle data at will (short...
Conference

A language feature to unbundle data at will (short paper)

Abstract

Programming languages with sufficiently expressive type systems provide users with different means of data ‘bundling’. Specifically, in dependently-typed languages such as Agda, Coq, Lean and Idris, one can choose to encode information in a record either as a parameter or a field. For example, we can speak of graphs over a particular vertex set, or speak of arbitrary graphs where the vertex set is a component. These create isomorphic types, but differ with respect to intended use. Traditionally, a library designer would make this choice (between parameters and fields); if a user wants a different variant, they are forced to build conversion utilities, as well as duplicate functionality. For a graph data type, if a library only provides a Haskell-like typeclass view of graphs over a vertex set, yet a user wishes to work with the category of graphs, they must now package a vertex set as a component in a record along with a graph over that set. We design and implement a language feature that allows both the library designer and the user to make the choice of information exposure only when necessary, and otherwise leave the distinguishing line between parameters and fields unspecified. Our language feature is currently implemented as a prototype meta-program incorporated into Agda’s Emacs ecosystem, in a way that is unobtrusive to Agda users.

Authors

Al-hassy M; Carette J; Kahl W

Pagination

pp. 14-19

Publisher

Association for Computing Machinery (ACM)

Publication Date

October 21, 2019

DOI

10.1145/3357765.3359523

Name of conference

Proceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
View published work (Non-McMaster Users)

Contact the Experts team