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

Datatype generic programming in F#

Published:30 August 2015Publication 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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Tsarpalis. FsPickler. http://nessos.github.io/ FsPickler, 2013.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Datatype generic programming in F#

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • 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

        Copyright © 2015 ACM

        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]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 30 August 2015

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate30of43submissions,70%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader