skip to main content
10.1145/2808098.2808101acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Datatype generic programming in F#

Published: 30 August 2015 Publication History

Abstract

Datatype generic programming enables programmers to define functions by induction over the structure of types on which these functions operate. This paper presents a library for datatype generic programming in F#, built on top of the .NET reflection mechanism.The generic functions defined using this library can be called by any other language running on the .NET platform.

References

[1]
R. Backhouse, P. Jansson, J. Jeuring, and L. Meertens. Generic programming. In Advanced Functional Programming, pages 28–115. Springer, 1999.
[2]
B. C. d. S. Oliveira and J. Gibbons. Scala for generic programmers. Journal of Functional Programming, 20(3,4):303–352, 2010. URL http://www.comlab.ox.ac.uk/ jeremy.gibbons/ publications/ scalagp-jfp.pdf. Revised version of the WGP2008 paper. A. Granicz. Functional web and mobile development in f#. In V. Zsk, Z. Horvth, and L. Csat, editors, Central European Functional Programming School, volume 8606 of Lecture Notes in Computer Science, pages 381–406. Springer International Publishing, 2015. ISBN 978-3-319-15939-3. URL http://dx.doi.org/10.1007/978-3-319-15940-9 9. R. Hinze and J. Jeuring. Generic Haskell: Practice and Theory. In Generic Programming, pages 1–56. Springer, 2003.
[3]
A. H˚akansson and S. Robbins. Nancy. http://nancyfx.org. P. Jansson and J. Jeuring. Polyp – a polytypic programming language extension. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 470–482. ACM, 1997.
[4]
R. Lämmel and S. Peyton Jones. Scrap your boilerplate: A practical design pattern for generic programming. In Proceedings of the 2003 ACM SIGPLAN International Workshop on Types in Languages Design and Implementation, TLDI ’03, pages 26–37, New York, NY, USA, 2003. ACM. ISBN 1-58113-649-8. URL http://doi.acm.org/10.1145/604174.604179.
[5]
J. P. Magalh˜aes, A. Dijkstra, J. Jeuring, and A. Löh. A generic deriving mechanism for haskell. In Proceedings of the Third ACM Symposium on Haskell, Haskell ’10, pages 37–48, 2010. ISBN 978-1-4503-0252-4. J. P. Magalh˜aes and J. Jeuring. Generic programming for indexed datatypes. In Proceedings of the seventh ACM SIGPLAN workshop on Generic programming, pages 37–46. ACM, 2011.
[6]
N. Mitchell and C. Runciman. Uniform boilerplate and list processing. In Proceedings of the ACM SIGPLAN Workshop on Haskell Workshop, Haskell ’07, pages 49–60, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-674-5. URL http://doi.acm.org/10.1145/1291201.1291208.
[7]
T. V. Noort, A. Rodriguez, S. Holdermans, J. Jeuring, and B. Heeren. A lightweight approach to datatype-generic rewriting. In International Conference on Functional Programming, pages 13–24, 2008. E. Rodriguez. A library for datatype generic programming in F#. http://github.com/netogallo/FSharp-Generics, 2015.
[8]
T. Sheard and S. Peyton Jones. Template meta-programming for haskell. In In Proceedings of the ACM SIGPLAN Workshop on Haskell, pages 1–16. ACM, 2002.
[9]
D. Syme. Leveraging .net meta-programming components from f#: integrated queries and interoperable heterogeneous execution. In Proceedings of the 2006 workshop on ML. ACM, 2006. URL http://research.microsoft.com/ apps/ pubs/ default.aspx? id=147193.
[10]
D. Syme, K. Battocchi, K. Takeda, D. Malayeri, J. Fisher, J. Hu, T. Liu, B. McNamara, D. Quirk, M. Taveggia, W. Chae, U. Matsveyeu, and T. Petricek. F#3.0 - strongly-typed language support for internet-scale information sources. Technical Report MSR-TR-2012-101, September 2012a. URL http://research.microsoft.com/ apps/ pubs/ default.aspx?id=173076.
[11]
D. Syme, A. Granicz, and A. Cisternino. Expert F# 3.0. Apress, November 2012b. URL http://research.microsoft.com/ apps/ pubs/ default.aspx?id=192596.
[12]
E. Tsarpalis. FsPickler. http://nessos.github.io/ FsPickler, 2013.
[13]
S. Weirich. Replib: A library for derivable type classes. In Proceedings of the 2006 ACM SIGPLAN Workshop on Haskell, Haskell ’06, pages 1–12, New York, NY, USA, 2006. ACM. ISBN 1-59593-489-8. URL http://doi.acm.org/10.1145/1159842.1159844.
[14]
A. R. Yakushev, S. Holdermans, A. Lh, and J. Jeuring. Generic programming with fixed points for mutually recursive datatypes. In International Conference on Functional Programming, pages 233–244, 2009.

Cited By

View all
  • (2019)Apla Generic Constraint Matching Detection and Verification2019 24th International Conference on Engineering of Complex Computer Systems (ICECCS)10.1109/ICECCS.2019.00030(210-219)Online publication date: Nov-2019

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
WGP 2015: Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming
August 2015
44 pages
ISBN:9781450338103
DOI:10.1145/2808098
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: 30 August 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. F#
  2. datatype generic programming
  3. reflection

Qualifiers

  • Research-article

Conference

ICFP'15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 30 of 43 submissions, 70%

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)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 27 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Apla Generic Constraint Matching Detection and Verification2019 24th International Conference on Engineering of Complex Computer Systems (ICECCS)10.1109/ICECCS.2019.00030(210-219)Online publication date: Nov-2019

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