skip to main content
10.1145/1086365.1086397acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Associated type synonyms

Published: 12 September 2005 Publication History

Abstract

Haskell programmers often use a multi-parameter type class in which one or more type parameters are functionally dependent on the first. Although such functional dependencies have proved quite popular in practice, they express the programmer's intent somewhat indirectly. Developing earlier work on associated data types, we propose to add functionally dependent types as type synonyms to type-class bodies. These associated type synonyms constitute an interesting new alternative to explicit functional dependencies.

References

[1]
Manuel M. T. Chakravarty, Gabriele Keller, Simon Peyton Jones,and Simon Marlow. Associated types with class. In Martin Abadi, editor, Conference Record of POPL 2005: The 32nd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 1--13. ACM Press, 2005.]]
[2]
James Cheney and Ralf Hinze. First-class phantom types. Technical Report TR2003-1901, Cornell University, 2003.]]
[3]
Dominique Clément, Thierry Despeyroux, Gilles Kahn, and Joëlle Despeyroux. A simple applicative language: mini-ML. In LFP '86: Proceedings of the 1986 ACM Conference on LISP and Functional Programming, pages 13--27, New York, NY, USA, 1986. ACM Press.]]
[4]
Olivier Danvy. Functional unparsing. J. Funct. Program., 8(6):621--625, 1998.]]
[5]
Derek Dreyer, Karl Crary, and Robert Harper. A type system for higher-order modules. In Proceedings of the 30th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 236--249, 2003.]]
[6]
Gregory J. Duck, Simon Peyton Jones, Peter J. Stuckey, and Martin Sulzmann. Sound and decidable type inference for functional dependencies. In ESOP;04, LNCS. Springer-Verlag, 2004.]]
[7]
Karl-Filip Faxén. A static semantics for Haskell. Journal of Functional Programming, 12(4+5), 2002.]]
[8]
Ronald Garcia, Jaakko Jarvi, Andrew Lumsdaine, Jeremy Siek, and Jeremiah Willcock. A comparative study of language support for generic programming. In Proceedings of the 18th ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 115--134. ACM Press, 2003.]]
[9]
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM Trans. Program. Lang. Syst., 18(2):109--138, 1996.]]
[10]
Ralf Hinze. Formatting: A class act. Journal of Functional Programming, 13:935--944, 2003.]]
[11]
Ralf Hinze and Simon Peyton Jones. Derivable type classes. In Graham Hutton, editor, Proceedings of the 2000 ACM SIGPLAN Haskell Workshop, volume 41.1 of Electronic Notes in Theoretical Computer Science. Elsevier Science, 2001.]]
[12]
Mark P. Jones. A theory of qualified types. In ESOP'92: Symposium proceedings on 4th European symposium on programming, pages 287--306, London, UK, 1992. Springer-Verlag.]]
[13]
Mark P. Jones. Simplifying and improving qualified types. In FPCA '95: Conference on Functional Programming Languages and Computer Architecture. ACM Press, 1995.]]
[14]
Mark P. Jones. A system of constructor classes: Overloading and implicit higher-order polymorphism. Journal of Functional Programming, 5(1), 1995.]]
[15]
Mark P. Jones. Type classes with functional dependencies. In Proceedings of the 9th European Symposium on Programming (ESOP 2000), number 1782 in Lecture Notes in Computer Science. Springer-Verlag, 2000.]]
[16]
Simon Peyton Jones, Geoffrey Washburn, and Stephanie Weirich. Wobbly types: type inference for generalised algebraic data types. http://research.microsoft.com/Users/simonpj/papers/gadt/index.htm, 2004.]]
[17]
Oleg Kiselyov. Functions with the variable number (of variously typed) arguments. http://okmij.org/ftp/Haskell/vararg-fn.lhs, 2004.]]
[18]
Oleg Kiselyov, Ralf Lämmel, and Keean Schupke. Strongly typed heterogeneous collections. In Haskell '04: Proceedings of the ACM SIGPLAN Workshop on Haskell, pages 96--107, New York, NY, USA, 2004. ACM Press.]]
[19]
J. W. Klop. Term rewriting systems. In S. Abramsky D. M. Gabbay and T. S. E. Maibaum, editors, Handbook of Logic in Computer Science, volume 2, pages 1--116. Oxford University Press, 1992.]]
[20]
Nathan C. Myers. Traits: a new and useful template technique. C++ Report, June 1995.]]
[21]
Matthias Neubauer and Peter Thiemann. Type classes with more higher-order polymorphism. In ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 179--190, New York, NY, USA, 2002. ACM Press.]]
[22]
Matthias Neubauer, Peter Thiemann, Martin Gasbichler, and Michael Sperber. Functional logic overloading. In POPL '02: Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 233--244. ACM Press, 2002.]]
[23]
Martin Odersky, Martin Sulzmann, and Martin Wehr. Type inference with constrained types. Theory and Practice of Object Systems, 5(1), 1999.]]
[24]
Didier Rémy. Extending ML type system with a sorted equational theory. Research Report 1766, INRIA Rocquencourt, 1992.]]
[25]
Tim Sheard. Languages of the future. In OOPSLA '04: Companion to the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 116--119, New York, NY, USA, 2004. ACM Press.]]
[26]
Tim Sheard and Simon Peyton Jones. Template meta-programming for Haskell. ACM SIGPLAN Notices: PLI Workshops, 37(12):60--75, 2002.]]
[27]
Jeremy Siek and Andrew Lumsdaine. Essential language support for generic programming. SIGPLAN Not., 40(6):73--84, 2005.]]
[28]
Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine. The Boost Graph Library User Guide and Reference Manual. Addison-Wesley, 2001.]]
[29]
A. A. Stepanov and M. Lee. The standard template library. Technical Report X3J16/94-0095, WG21/N0482, ISO Programming Language C++ Project, 1994.]]
[30]
Peter J. Stuckey and Martin Sulzmann. A theory of overloading. ACM Transactions on Programming Languages and Systems, 2004. To appear.]]
[31]
The GHC Team. The Glasgow Haskell Compiler. http://haskell.org/ghc/documentation.html.]]
[32]
Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In Proceedings of the 30th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 224--235. ACM Press, 2003.]]

Cited By

View all
  • (2024)Type Checking with Rewriting RulesProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695640(171-183)Online publication date: 17-Oct-2024
  • (2023)Weighted Refinement Types for Counterpoint CompositionProceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design10.1145/3609023.3609804(2-7)Online publication date: 30-Aug-2023
  • (2022)Embedded pattern matchingProceedings of the 15th ACM SIGPLAN International Haskell Symposium10.1145/3546189.3549917(123-136)Online publication date: 6-Sep-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '05: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
September 2005
342 pages
ISBN:1595930647
DOI:10.1145/1086365
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 9
    Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
    September 2005
    330 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1090189
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 September 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. associated types
  2. generic programming
  3. type classes
  4. type functions
  5. type inference

Qualifiers

  • Article

Conference

ICFP05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)39
  • Downloads (Last 6 weeks)2
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Type Checking with Rewriting RulesProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695640(171-183)Online publication date: 17-Oct-2024
  • (2023)Weighted Refinement Types for Counterpoint CompositionProceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design10.1145/3609023.3609804(2-7)Online publication date: 30-Aug-2023
  • (2022)Embedded pattern matchingProceedings of the 15th ACM SIGPLAN International Haskell Symposium10.1145/3546189.3549917(123-136)Online publication date: 6-Sep-2022
  • (2020)Describing microservices using modern Haskell (experience report)Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell10.1145/3406088.3409018(1-8)Online publication date: 27-Aug-2020
  • (2019)A compiler architecture for domain-specific type error diagnosisOpen Computer Science10.1515/comp-2019-00029:1(33-51)Online publication date: 14-Feb-2019
  • (2019)Kind inference for datatypesProceedings of the ACM on Programming Languages10.1145/33711214:POPL(1-28)Online publication date: 20-Dec-2019
  • (2019)Synthesizing replacement classesProceedings of the ACM on Programming Languages10.1145/33711204:POPL(1-33)Online publication date: 20-Dec-2019
  • (2019)Virtual timeline: a formal abstraction for verifying preemptive schedulers with temporal isolationProceedings of the ACM on Programming Languages10.1145/33710884:POPL(1-31)Online publication date: 20-Dec-2019
  • (2019)Trace types and denotational semantics for sound programmable inference in probabilistic languagesProceedings of the ACM on Programming Languages10.1145/33710874:POPL(1-32)Online publication date: 20-Dec-2019
  • (2019)Par means parallel: multiplicative linear logic proofs as concurrent functional programsProceedings of the ACM on Programming Languages10.1145/33710864:POPL(1-28)Online publication date: 20-Dec-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media