Skip to main content

First class file I/O

  • Conference paper
  • First Online:
Implementation of Functional Languages (IFL 1996)

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

Included in the following conference series:

Abstract

In most functional languages little attention has been paid to file I/O. The file system is poorly typed at best and some classes of objects, in particular functions, cannot be stored on disk at all. In this article we present a mature type system for typing files. We also discuss briefly how we plan to implement the storage of functions in files. We make use of the concept of dynamic types, as introduced in Abadi et al., which provide an interface between statically and dynamically typed parts of a program. We have modified the concept of dynamic types to include polymorphic types in a natural way and we are implementing this modified system of dynamic types in the functional language Clean. We have developed a simple run-time matching algorithm for the dynamic type checks. We present some of the problems we encountered when the system of dynamic types is implemented to its full extent in a language that already has an elaborate type system. Finally we show that the same concepts that we used for constructing the file system can be used for communication between independently running programs in general.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Abadi, L. Cardelli, B. Pierce, G. Plotkin. Dynamic typing in a statically typed language, ACM Transactions on Programming Languages and Systems 13(2):237–268, 1991.

    Google Scholar 

  2. M. Abadi, L. Cardelli, B. Pierce, D. Rémy. Dynamic typing in polymorphic languages, In: Journal of Functional Programming 5(1):111–130, Cambridge University Press 1995.

    Google Scholar 

  3. E. Barendsen and J. Smetsers. Uniqueness Typing for Functional Languages with Graph Rewriting Semantics, to appear in MSCS.

    Google Scholar 

  4. R. Connor, A.Brown, Q Cutts, A. Dearie, R. Morrison and J. Rosenberg. Type Equivalence Checking in Persistent Object Systems, In: Implementing Persistent Object Bases pp.151–164, Morgan Kaufman 1990

    Google Scholar 

  5. M. van Eekelen, M. Plasmeijer. Functional Programming and Parallel Graph Rewriting, Addison-Wesley 1993.

    Google Scholar 

  6. M. van Eekelen, M. Plasmeijer. Concurrent Clean 1.0 language report, Computing Science Institute, University of Nijmegen, http://www.cs.kun.nl/~clean/Clean.Cleanbook.html.

    Google Scholar 

  7. X. Leroy, M. Mauny. Dynamics in ML, In: Journal of Functional Programming 3(4), Cambridge University Press 1995.

    Google Scholar 

  8. R. Morrison, A.Brown, R. Carrick, R. Connor, A. Dearie, and M. Atkinson. The Napier Type System, In: Persistent Object Systems pp.3–18, Springer-Verlag 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Werner Kluge

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Pil, M. (1997). First class file I/O. In: Kluge, W. (eds) Implementation of Functional Languages. IFL 1996. Lecture Notes in Computer Science, vol 1268. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63237-9_28

Download citation

  • DOI: https://doi.org/10.1007/3-540-63237-9_28

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63237-5

  • Online ISBN: 978-3-540-69239-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics