Conference proceeding
Partial type constructors in practice
Haskell 2022: Proceedings of the 15th ACM SIGPLAN International Haskell Symposium, pp.95-107
Haskell '22: 15th ACM SIGPLAN International Haskell Symposium (Ljubljana, Slovenia, 09/15/2022 - 09/16/2022)
09/06/2022
DOI: 10.1145/3546189.3549923
Appears in UI Libraries Support Open Access
Abstract
Type constructors in functional programming languages are total: a Haskell programmer can equally readily construct lists of any element type. In practice, however, not all applications of type constructors are equally sensible: collections may only make sense for orderable elements, or embedded DSLs might only make sense for serializable return types. Jones et al. proposed a theory of partial type constructors, which guarantees that type applications are sensible, and extends higher-order abstractions to apply equally well to partial and total type constructors. This paper evaluates the practicality of partial type constructors, in terms of both language design and implementation. We extend GHC, the most widely used Haskell compiler, with support for partial type constructors, and test our extension on the compiler itself and its libraries. We show that introducing partial type constructors has a minimal impact on most code, but raises important questions in language and library design.
Details
- Title: Subtitle
- Partial type constructors in practice
- Creators
- Apoorv Ingle - University of IowaAlex Hubers - University of IowaJ Garrett Morris - University of Iowa, Computer Science
- Resource Type
- Conference proceeding
- Publication Details
- Haskell 2022: Proceedings of the 15th ACM SIGPLAN International Haskell Symposium, pp.95-107
- Conference
- Haskell '22: 15th ACM SIGPLAN International Haskell Symposium (Ljubljana, Slovenia, 09/15/2022 - 09/16/2022)
- Publisher
- Association for Computing Machinery (ACM)
- DOI
- 10.1145/3546189.3549923
- Language
- English
- Date published
- 09/06/2022
- Academic Unit
- Computer Science
- Record Identifier
- 9984473237702771
Metrics
9 Record Views