Skip to main content

Porting the Clean Object I/O Library to Haskell

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2011))

Abstract

Pure, functional programming languages offer several solutions to construct Graphical User Interfaces (GUIs). In this paper we report on a project in which we port the Clean Object I/O library to Haskell. The Clean Object I/O library uses an explicit environment passing scheme, based on the uniqueness type system of Clean. It supports many standard GUI features suchas windows, dialogues, controls, and menus. Applications can have timing behaviour. In addition, there is support for interactive processes and message passing. The standard functional programming language Haskell uses a monadic framework for I/O. We discuss how the Object I/O library can be put in a monadic framework without loosing its essential features. We give an implementation of an essential fragment of the Object I/O library to demonstrate the feasibility. We take especial consideration for the relevant design choices. One particular design choice, how to handle state, results in two versions.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Achten, P. M., van Groningen, J. H. G., and Plasmeijer, M. J. High Level Specification of I/O in Functional Languages. In Launchbury, J., Sansom, P. eds., Proceedings Glasgow Workshop on Functional Programming, Ayr, Scotland, 6–8 July 1992. Workshops in Computing, Springer-Verlag, Berlin, 1993, pp. 1–17.

    Google Scholar 

  2. Achten, P. M. and Plasmeijer, M. J. The ins and outs of Clean I/O. In Journal of Functional Programming 5(1)-January 1995, Cambridge University Press, pp. 81–110.

    Article  MATH  Google Scholar 

  3. Achten, P. M. and Plasmeijer, M. J. Concurrent Interactive Processes in a Pure Functional Language. In Vliet, J. C. van, ed., Proceedings Computing Science in the Netherlands, CSN’95, Jaarbeurs Utrecht, The Netherlands, November 27–28, Stichting Mathematisch Centrum, Amsterdam, 1995, pp. 10–21.

    Google Scholar 

  4. Achten, P. M. and Plasmeijer, M. J. Interactive Functional Objects in Clean. In Clack, C., Hammond, K. and Davie, T. eds., Proceedings 9th International Workshop Implementation of Functional Languages, IFL’97, St. Andrews, Scotland, UK, September 1997, selected papers, LNCS 1467, Springer, pp. 304–321.

    Google Scholar 

  5. Achten, P. M. and Plasmeijer, M. J. The implementation of interactive local state transition systems in Clean. In Koopman, P., Clack, C. eds., Proceedings 11th International Workshop Implementation of Functional Languages, IFL’99, Lochem, The Netherlands, September 1999, selected papers, LNCS 1868, Springer, pp. 115–130.

    Google Scholar 

  6. Achten, P. M. and Wierich, M. A Tutorial to the Clean Object I/O Library-version 1.2. Technical Report CSI-R0003, February 2, 2000, Computing Science Institute, Faculty of Mathematics and Informatics, University of Nijmegen, The Netherlands.

    Google Scholar 

  7. Barendsen, E. and Smetsers, J. E. W. Uniqueness Type Inference. In [14], 189–206.

    Google Scholar 

  8. 8. Bjørner, D., Broy, M., Pottosin, I. V. eds. Perspectives of System Informatics, Second International Andrei Ershov Memorial Conference Akademgorodok, Novosibirsk, Russia, June 25–28, 1996, Proceedings, LNCS 1181, Springer.

    MATH  Google Scholar 

  9. Brus, T., Eekelen, M. C. J. D. van, Leer, M.O. van, and Plasmeijer, M. J. Clean: A Language for Functional Graph Rewriting. In Kahn. G. ed. Proceedings of the Third International Conference on Functional Programming Languages and Computer Architecture, Portland, Oregon, USA, LNCS 274, Springer-Verlag, pp. 364–384.

    Google Scholar 

  10. Carlsson, M. and Hallgren, Th. Fudgets-A Graphical User Interface in a Lazy Functional Language. In Proceedings of Conference on Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, 9–11 June 1993, ACM Press, pp. 321–330.

    Google Scholar 

  11. Finne, S. A Haskell foreign function interface. Available as GHC extension, see: http://www.haskell.org/ghc/docs/latest/set/sec-foreign.html.

  12. Finne, S., Leijen, D., Meijer, E., and Peyton Jones, S. Calling hell from heaven and heaven from hell. In ACM SIGPLAN International Conference on Functional Programming (ICFP’99), Paris, ACM Press, pp. 114–125.

    Google Scholar 

  13. Frauenstein, Th., Grieskamp, W., Pepper, P., and Südholt. Communicating Functional Agents and Their Application to Graphical User Interfaces. In [8], pp. 386–397.

    Google Scholar 

  14. Hermenegildo, M. and Swierstra, S. D. eds. Proceedings of Seventh International Symposium on Programming Languages: Implementations, Logics and Programs, Utrecht, The Netherlands, 20–22 September 1995, LNCS 982, Springer-Verlag.

    Google Scholar 

  15. Hudak, P., Peyton Jones, S., Wadler, Ph., Boutel, B., Fairbairn, J., Fasel, J., Hammond, K., Hughes, J., Johnsson, Th., Kieburtz, D., Nikhil, R., Partain, W., Peterson, J. Report on the programming language Haskell, In ACM SigPlan Notices, 27(5): 1–164.

    Google Scholar 

  16. Noble, R. and Runciman, C. Gadgets: Lazy Functional Components for Graphical User Interfaces. In [14], pp. 321–340.

    Google Scholar 

  17. Nöcker, E. G. J. M. H., Smetsers, J. E. W., Eekelen, M. C. J. D. van, and Plasmeijer, M. J. Concurrent Clean. In Aarts, E. H. L., Leeuwen, J. van, Rem, M., eds., Proceedings of Parallel Architectures and Languages Europe, June, Eindhoven, The Netherlands. LNCS 506, Springer-Verlag, pp. 202–219.

    Google Scholar 

  18. Peyton Jones, S. L. and Wadler, Ph. Imperative Functional Programming. In Proceedings of the 20th Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, Charleston, South Carolina, January 10–13, 1993, 71–84.

    Google Scholar 

  19. Peyton Jones, S., Gordon, A., Finne, S. Concurrent Haskell. In 23rd ACM Symposium on Principles of Programming Languages (POPL’96), January 1996, St.Petersburg Beach, Florida, ACM, pp. 295–308.

    Google Scholar 

  20. Peyton Jones, S. and Hughes, J. eds. Report on the Programming Language Haskell 98-A Non-strict, Purely Functional Language, 1 February 1999.

    Google Scholar 

  21. Plasmeijer, M. J. and van Eekelen, M. C. J. D. Functional Programming and Parallel Graph Rewriting. Addison-Wesley Publishing Company 1993.

    Google Scholar 

  22. Sage, M. TclHaskell. http://www.dcs.gla.ac.uk/~meurig/TclHaskell/.

  23. Scholz, E. Pidgets-Unifying Pictures and Widgets in a Constraint-Based Framework for Concurrent GUI Programming. In Kuchen, H., Swierstra, S. D. eds. Proceedings of eighth International Symposium on Programming Languages: Implementations, Logics, and Programs, Aachen, Germany, September 1996, LNCS 1140, Springer, pp. 363–377.

    Google Scholar 

  24. Smetsers, J. E. W., Barendsen, E., Eekelen, M. C. J. D. van, and Plasmeijer, M. J. Guaranteeing Safe Destructive Updates througha Type System withUniqueness Information for Graphs. In Schneider, H. J., Ehrig, H. eds. Proceedings Workshop Graph Transformations in Computer Science, Dagstuhl Castle, Germany, January 4–8, 1993, LNCS 776, Springer-Verlag, Berlin, pp. 358–379.

    Google Scholar 

  25. Vullinghs, T., Schulte, W., and Schwinn, Th. The Design of a Functional GUI Library Using Constructor Classes. In [8], pp. 398–408.

    Google Scholar 

  26. Vullinghs, T., Tuijnman, D., and Schulte, W. Lightweight GUIs for Functional Programming. In [14], pp. 341–356.

    Google Scholar 

  27. Wadler, Ph. Comprehending monads. In Proceedings of the ACM Conference on Lisp and Functional Programming, Nice, 1990, ACM Press, pp. 61–78.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Achten, P., Peyton Jones, S. (2001). Porting the Clean Object I/O Library to Haskell. In: Mohnen, M., Koopman, P. (eds) Implementation of Functional Languages. IFL 2000. Lecture Notes in Computer Science, vol 2011. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45361-X_12

Download citation

  • DOI: https://doi.org/10.1007/3-540-45361-X_12

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41919-8

  • Online ISBN: 978-3-540-45361-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics