Back to Search Start Over

Higher-order type-level programming in Haskell

Authors :
Kiss, C
Field, A
Eisenbach, S
Peyton Jones, S
Source :
International Conference on Functional Programming
Publication Year :
2019
Publisher :
Association for Computing Machinery (ACM), 2019.

Abstract

Type family applications in Haskell must be fully saturated. This means that all type-level functions haveto be first-order, leading to code that is both messy and longwinded. In this paper we detail an extension toGHC that removes this restriction. We augment Haskell’s existing type arrow,→, with anunmatchablearrow,↠, that supports partial application of type families without compromising soundness. A soundness proof isprovided. We show how the techniques described can lead to substantial code-size reduction (circa 80%) inthe type-level logic of commonly-used type-level libraries whilst simultaneously improving code quality and readability.

Details

Database :
OpenAIRE
Journal :
International Conference on Functional Programming
Accession number :
edsair.od......1032..10d6248c1d956ce935bf0cbfe8e661d0