Advertisement

Dynamic Construction of Generic Functions

  • Ronny Wichers Schreur
  • Rinus Plasmeijer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3474)

Abstract

This paper presents a library for the run-time construction and specialisation of generic or polytypic functions. This library utilises the type information that is available in dynamics to implement generic functions on their values. The library closely follows the static generic framework, both in its use and in its implementation. It can dynamically construct generic operations ranging from equality, map and parsers to pretty printers and generic graphical editors. A special feature of the library is that it can also be used to derive meaningful specialisations of generic functions that operate on the type representation of the dynamic.

Keywords

Conversion Function Functional Language List Type Library Function Type Constructor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi, M., Cardelli, L., Pierce, B., Plotkin, G., Rèmy, D.: Dynamic typing in polymorphic languages. In: Proceedings of the ACM SIGPLAN Workshop on ML and its Applications, San Francisco (June 1992)Google Scholar
  2. 2.
    Achten, P., Alimarine, A., Plasmeijer, R.: When generic functions use dynamic values. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 17–33. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Achten, P., van Eekelen, M., Plasmeijer, R.: Generic Graphical User Interfaces. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, pp. 152–167. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  4. 4.
    Alimarine, A., Plasmeijer, R.: A Generic Programming Extension for Clean. In: Arts, T., Mohnen, M. (eds.) IFL 2001. LNCS, vol. 2312, pp. 168–186. Springer, Heidelberg (2002)Google Scholar
  5. 5.
    Alimarine, A., Smetsers, S.: Optimizing generic functions. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 16–31. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  6. 6.
    Alimarine, A., Smetsers, S.: Improved fusion for optimizing generics. In: Hermenegildo, M.V., Cabeza, D. (eds.) PADL 2004. LNCS, vol. 3350, pp. 203–218. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Cheney, J., Hinze, R.: A lightweight implementation of generics and dynamics (2002)Google Scholar
  8. 8.
    Hinze, R.: A new approach to generic functional programming. In: The 27th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Boston, Massachusetts, January 2000, pp. 119–132 (2000)Google Scholar
  9. 9.
    Hinze, R., Peyton Jones, S.: Derivable Type Classes. In: Hutton, G. (ed.) 2000 ACM SIGPLAN Haskell Workshop, Montreal, Canada. ENTCS, vol. 41(1). Elsevier Science, Amsterdam (2001)Google Scholar
  10. 10.
    Koopman, P., Alimarine, A., Tretmans, J., Plasmeijer, R.: Gast: Generic automated software testing. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 84–100. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  11. 11.
    Lämmel, R., Peyton Jones, S.: Scrap your boilerplate: a practical design pattern for generic programming. ACM SIGPLAN Notices 38(3), 26–37 (2003); Proc. of the ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI 2003)Google Scholar
  12. 12.
    Lämmel, R., Peyton Jones, S.: Scrap more boilerplate: reflection, zips, and generalised casts. In: Proceedings; International Conference on Functional Programming (ICFP 2004), p. 12. ACM Press, New York (2004) (to appear)Google Scholar
  13. 13.
    Peyton Jones, S., Hughes, J., et al.: Report on the programming language Haskell 1998. University of Yale (1999), http://www.haskell.org/definition/
  14. 14.
    Pil, M.: Dynamic types and type dependent functions. In: Hammond, K., Davie, T., Clack, C. (eds.) IFL 1998. LNCS, vol. 1595, pp. 169–185. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  15. 15.
    Plasmeijer, R., van Eekelen, M.: Concurrent CLEAN Language Report (version 2.0) (December 2001), http://www.cs.kun.nl/~clean/contents/contents.html
  16. 16.
    van Weelden, A., Plasmeijer, R.: Towards a strongly typed functional operating system. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 215–231. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  17. 17.
    Vervoort, M., Plasmeijer, R.: Lazy dynamic input/output in the lazy functional language Clean. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 101–117. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Ronny Wichers Schreur
    • 1
  • Rinus Plasmeijer
    • 1
  1. 1.Institute for Computing and Information SciencesRadboud University NijmegenNijmegenThe Netherlands

Personalised recommendations