Hostname: page-component-7c8c6479df-94d59 Total loading time: 0 Render date: 2024-03-27T19:14:38.223Z Has data issue: false hasContentIssue false

Data types à la carte

Published online by Cambridge University Press:  18 March 2008

WOUTER SWIERSTRA*
Affiliation:
School of Computer Science, University of Nottingham, Jubilee Campus, Nottingham, NG8 1BB (e-mail: wss@cs.nott.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell's monolithic IO monad.

Type
Functional Pearls
Copyright
Copyright © Cambridge University Press 2008

References

Awodey, S. (2006) Category Theory. Oxford Logic Guides, vol. 49. Oxford: Oxford University Press.CrossRefGoogle Scholar
Johann, P. & Ghani, N. (2007) Initial algebra semantics is enough! Typed Lambda Calculi and Applications. Lecture Notes in Computer Science, vol. 4583. Springer.CrossRefGoogle Scholar
Johann, P. & Ghani, N. (2008) Foundations for structured programming with GADTs. In Conference record of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. San Francisco, California, pp. 297308.Google Scholar
Liang, S., Hudak, P. & Jones, M. (1995) Monad transformers and modular interpreters. In Conference record of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. San Francisco, California, pp. 333343.Google Scholar
Löh, A. & Hinze, R. (2006) Open data types and open functions. Princ. Prac. Declarative Program. Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming. Venice, Italy, pp. 133–144.CrossRefGoogle Scholar
Lüth, C. & Ghani, N. (2002) Composing monads using coproducts. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming. Pittsburgh, PA, pp. 133–144.CrossRefGoogle Scholar
Meijer, E., Fokkinga, M. & Paterson, R. (1991) Functional programming with bananas, lenses, envelopes and barbed wire. In Proceedings ACM Conference on Functional Programming Languages and Computer Architecture.CrossRefGoogle Scholar
Sheard, T. (2001) Generic unification via two-level types and parameterized modules. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming. Florence, Italy, pp. 86–97.Google Scholar
Swierstra, W. & Altenkirch, T. (2007) Beauty in the beast: A functional semantics of the awkward squad. In Proceedings of the ACM SIGPLAN Haskell Workshop. Freiburg, Germany, pp. 25–36.CrossRefGoogle Scholar
Wadler, P. (1998). The Expression Problem. Accessed at http://homepages.inf.ed.ac.uk/wadler/papers/expression/expression.txt.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.