skip to main content
10.1145/378795.378858acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Asynchronous exceptions in Haskell

Published:01 May 2001Publication History

ABSTRACT

Asynchronous exceptions, such as timeouts are important for robust, modular programs, but are extremely difficult to program with — so much so that most programming languages either heavily restrict them or ban them altogether. We extend our earlier work, in which we added synchronous exceptions to Haskell, to support asynchronous exceptions too. Our design introduces scoped combinators for blocking and unblocking asynchronous interrupts, along with a somewhat surprising semantics for operations that can suspend. Uniquely, we also give a formal semantics for our system.

References

  1. 1.J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent Programming in Erlang. Prentice Hall Europe, second edition, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.K. Arnold and J. Gosling. The Java Programming Language. The Java Series. Addison-Wesley, second edition, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.P. Barth, R. S. Nikhil, and Arvind. M-Structures: Extending a parallel, non-strict functional language with state. In R. J. M. Hughes, editor, Proc. FPCA'91, volume 523 of LNCS, pages 538-568. Springer-Verlag, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.A. D. Birrell, J. V. Guttag, J. J. Horning, and R. Levin. Thread synchronization: A formal specification. In G. Nelson, editor, Systems Programming with Modula- 3, chapter 5, pages 119-129. Prentice Hall, Englewood Cliffs, NJ, 1991.]]Google ScholarGoogle Scholar
  5. 5.R. P. Gabriel and J. McCarthy. Queue-based multiprocessing Lisp. In Proc. LFP'84, pages 25-44, Aug. 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.T. Ito and M. Matsui. A parallel lisp language PaiLisp and its kernel specification. In Parallel Lisp: Languages and Systems, volume 441 of LNCS, pages 58-100, June 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.X. Leroy, D.Remy, J.Vouillon, and D. Doligez. The Objective Caml system documentation and user's manual (release 2.04). Technical report, INRIA, 1999. At http://caml.inria.fr/ocaml/htmlman/.]]Google ScholarGoogle Scholar
  8. 8.S. Marlow. Writing high-performance server applications in Haskell, case study: A Haskell web server. In Haskell Workshop, Montreal, Canada, September 2000.]]Google ScholarGoogle Scholar
  9. 9.R. Milner. The polyadic calculus: A tutorial. In F. L. Hamer, W. Brauer, and H. Schwichtenberg, editors, Logic and Algebra of Specification. Springer- Verlag, 1993.]]Google ScholarGoogle ScholarCross RefCross Ref
  10. 10.R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML(Revised). MIT Press, Cambridge, Massachusetts, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.A. K. Moran, S. B. Lassen, and S. L. Peyton Jones. Imprecise exceptions, co-inductively. InProc. HOOTS'99, volume 26 of Electronic Notes in Theoretical Computer Science, Paris, Sept. 1999.]]Google ScholarGoogle Scholar
  12. 12.S. Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptio ns, and foreignlanguage calls in Haskell. In R. Steinbrueggen, editor, Engineering theories of software construction, Marktoberdorf Summer School 2000, NATO ASI Series. IOS Press, 2001.]]Google ScholarGoogle Scholar
  13. 13.S. Peyton Jones, R. Hughes, L. Augustsson, D. Barton, B. Boutel, W. Burton, J. Fasel, K. Hammond, R. Hinze, P. Hudak, T. Johnsson, M. Jones, J. Launchbury, E. Meijer, J. Peterson, A. Reid, C. Runciman, and P. Wadler. Report on the programming language Haskell 98. Technical report, Feb. 1998.]]Google ScholarGoogle Scholar
  14. 14.S. L. Peyton Jones, A. Gordon, and S. Finne. Concurrent Haskell. In Proc. POPL'96, pages 295-308, St. Petersburg, Florida, Jan. 1996. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.S. L. Peyton Jones, A. Reid, T. Hoare, S. Marlow, and F. Henderson. A semantics for imprecise exceptions. In Proc. PLDI'99, volume 34(5) of ACM SIGPLAN Notices, pages 25-36. ACM Press, May 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.A. Reid. Handling exceptions in Haskell. Research Report YALEU/DCS/RR-1175, Yale University, Aug. 1998.]]Google ScholarGoogle Scholar
  17. 17.A. Reid. Putting the spine back in the Spineless Tagless G-Machine: An implementation of resumable blackholes. In Proc. IFL'98 (selected papers), volume 1595 of LNCS, pages 186-199. Springer-Verlag, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.J. H. Reppy. Asynchronous signals in Standard ML. Technical Report TR90-1144, Cornell University, Computer Science Department, Aug. 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, Oct. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.Why are Thread.stop, Thread.suspend, Thread.resume, and Runtime.runFinalizers On Exit deprecated? In the Java 2 SDK Standard Edition Documentation. At http://java.sun.com/products/jdk/1.3/docs/guide/ misc/threadPrimitiveDeprecation.html.]]Google ScholarGoogle Scholar
  21. 21.K. Yi. Compile-time detection of uncaught exceptions in Standard ML programs. In Proc. SAS'94, volume 864 of LNCS, pages 238-254, Sept. 1994.]]Google ScholarGoogle Scholar

Index Terms

  1. Asynchronous exceptions in Haskell

      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
        PLDI '01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
        June 2001
        331 pages
        ISBN:1581134142
        DOI:10.1145/378795

        Copyright © 2001 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: 1 May 2001

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        PLDI '01 Paper Acceptance Rate30of144submissions,21%Overall Acceptance Rate406of2,067submissions,20%

        Upcoming Conference

        PLDI '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader