GADTs, Functoriality, Parametricity: Pick Two
- ASU Author/Contributor (non-ASU co-authors, if there are any, appear on document)
- Patricia Johann Ph.D, Professor (Creator)
- Institution
- Appalachian State University (ASU )
- Web Site: https://library.appstate.edu/
Abstract: GADTs can be represented either as their Church encodings a la Atkey, or as fixpoints a la Johann and Polonsky. While a GADT represented as its Church encoding need not support a map function satisfying the functor laws, the fixpoint representation of a GADT must support such a map function even to be well-defined. The two representations of a GADT thus need not be the same in general. This observation forces a choice of representation of data types in languages supporting GADTs. In this paper we show that choosing whether to represent data types as their Church encodings or as fixpoints determines whether or not a language supporting GADTs can have parametric models. This choice thus has important consequences for how we can program with, and reason about, these advanced data types.
GADTs, Functoriality, Parametricity: Pick Two
PDF (Portable Document Format)
205 KB
Created on 9/15/2021
Views: 604
Additional Information
- Publication
- Johann, P., Ghiorzi, E., & Jeffries, D. (2021). GADTs, Functoriality, Parametricity: Pick Two. Accepted for presentation at Logical and Semantic Frameworks with Applications (LSFA'21). This work is licensed under the Creative Commons Attribution License. NC Docks permission to re-print granted by author(s).
- Language: English
- Date: 2021
- Keywords
- GADTs, parametric models, data types, Church encodings, fixpoints