Constrained type families

4Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.

Abstract

We present an approach to support partiality in type-level computation without compromising expressiveness or type safety. Existing frameworks for type-level computation either require totality or implicitly assume it. For example, type families in Haskell provide a powerful, modular means of defining type-level computation. However, their current design implicitly assumes that type families are total, introducing nonsensical types and significantly complicating the metatheory of type families and their extensions. We propose an alternative design, using qualified types to pair type-level computations with predicates that capture their domains. Our approach naturally captures the intuitive partiality of type families, simplifying their metatheory. As evidence, we present the first complete proof of consistency for a language with closed type families.

Cite

CITATION STYLE

APA

Morris, J. G., & Eisenberg, R. A. (2017). Constrained type families. Proceedings of the ACM on Programming Languages, 1(ICFP). https://doi.org/10.1145/3110286

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free