Characterizing functions mappable over GADTs
It is well-known that GADTs do not admit standard map functions of the kind supported by ADTs and nested types. In addition, standard map functions are insufficient to distribute their data-changing argument functions over all of the structure present in elements of deep GADTs, even just deep ADTs or nested types. This paper develops an algorithm that characterizes those functions on a (deep) GADT’s type arguments that are mappable over its elements. The algorithm takes as input a term $t$ whose type is an instance of a (deep) GADT $\mathsf{G}$, and returns a set of constraints a function must satisfy to be mappable over $t$. This algorithm, and thus this paper, can in some sense be read as \emph{defining} what it means for a function to be mappable over $t$: $f$ is mappable over an element $t$ of $\mathsf{G}$ precisely when it satisfies the constraints returned when our algorithm is run on $t$ and $\mathsf G$. This is significant: to our knowledge, there is no existing definition or other characterization of the intuitive notion of mappability for functions over GADTs.
Mon 5 DecDisplayed time zone: Auckland, Wellington change
15:30 - 17:30 | |||
15:30 30mTalk | Characterizing functions mappable over GADTs APLAS | ||
16:00 30mTalk | Applicative Intersection Types APLAS Xu Xue University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong, Ningning Xie University of Toronto | ||
16:30 30mTalk | A Calculus with Recursive Types, Record Concatenation and Subtyping APLAS Yaoda Zhou University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong, Andong Fan Hong Kong University of Science and Technology | ||
17:00 30mTalk | Novice Type Error Diagnosis with Natural Language Models APLAS Chuqin Geng McGill University, Haolin Ye McGill University, Yixuan Li McGill University, Tianyu Han McGill University, Brigitte Pientka McGill University, Xujie Si McGill University, Canada |