Erik Meijer
Bananas in space: extending fold and unfold to exponential types
Meijer, Erik; Hutton, Graham
Abstract
Fold and unfold are general purpose functionals for process-ing and constructing lists. By using the categorical approach of modelling recursive datatypes as fixed points of functors, these functionals and their algebraic properties were generalised from lists to polynomial (sum-of-product) datatypes. However, the restriction to polynomial datatypes is a serious limitation: it precludes the use of exponentials (function-spaces), whereas it is central to functional programming that functions are first-class values, and so exponentials should be able to be used freely in datatype definitions. In this paper we explain how Freyd’s work on modelling recursive datatypes as fixed points of difunctors shows how to generalise fold and unfold from polynomial datatypes to those involving exponentials. Knowledge of category theory is not required; we use Gofer throughout as our meta-language, making extensive use of constructor classes
Citation
Meijer, E., & Hutton, G. Bananas in space: extending fold and unfold to exponential types. Presented at International Conference on Functional Programming Languages and Computer Architecture (7th)
Conference Name | International Conference on Functional Programming Languages and Computer Architecture (7th) |
---|---|
End Date | Jun 28, 1995 |
Publication Date | Jun 1, 1995 |
Deposit Date | Mar 18, 2015 |
Publicly Available Date | Mar 18, 2015 |
Peer Reviewed | Peer Reviewed |
Public URL | https://nottingham-repository.worktribe.com/output/1024481 |
Publisher URL | http://dl.acm.org/citation.cfm?doid=224164.224225 |
Additional Information | Published in: FPCA '95: proceedings of the seventh International Conference on Functional Programming Languages and Computer Architecture. New York : ACM, 1995, ISBN: 0-89791-719-7. pp. 324-333, doi: 10.1145/224164.224225 |
Files
bananas.pdf
(149 Kb)
PDF
You might also like
Calculating Compilers Effectively (Functional Pearl)
(2024)
Presentation / Conference Contribution
Beyond Trees: Calculating Graph-Based Compilers (Functional Pearl)
(2024)
Journal Article
Quotient Haskell: Lightweight Quotient Types for All
(2024)
Journal Article
Programming language semantics: It’s easy as 1,2,3
(2023)
Journal Article
Calculating Compilers for Concurrency
(2023)
Journal Article
Downloadable Citations
About Repository@Nottingham
Administrator e-mail: discovery-access-systems@nottingham.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2024
Advanced Search