Skip to main content

Towards a Haskell/Java Connection

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

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

Included in the following conference series:

Abstract

This paper reports on preliminary work on a connection between Haskell and Java, with the goal of making software components written in Java available to Haskell programmers. We discuss several approaches, but find the Java platform surprisingly closed against other languages. We decide to use an indirect approach, based on proposed native interfaces for Haskell and Java, and describe this in more detail. A side-by-side overview of Hugs and the Java Virtual Machine highlights some similarities of the implementation designs. Both systems also have similar problems and solutions with respect to foreign language interfaces. Finally, we relate the proposed connection between Haskell and Java to other recent work on component-based programming in Haskell.

The work described in this paper is sponsored by an EPSRC grant GR/L34761 for the project on “First-class modules for component-based programming”

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Software AG. EntireX DCOM Release. http://www.softwareag.com/corporat/solutions/entirex/, January 1999.

  2. L. Augustsson. The HBC compiler. http://www.cs.chalmers.se/~augustss/hbc/hbc.html, January 1999.

  3. N. Benton, A. Kennedy, and G. Russell. Compiling Standard ML to Java Bytecodes. In Proc. 1998 International Conference on Functional Programming (ICFP’ 98), Baltimore, pages 129–140, September 1998.

    Google Scholar 

  4. P. Bothner. Kawa-Compiling Dynamic Languages to the Java VM. In Proc. Usenix Conference in New Orleans, June 1998.

    Google Scholar 

  5. K. Claessen, T. Vullinghs, and E. Meijer. Structuring Graphical Paradigms in TkGofer. In Proc. 1997 International Conference on Functional Programming (ICFP’ 97), June 1997.

    Google Scholar 

  6. Tcl/Tk Consortium. Home Page. http://www.tclconsortium.org/, 1999.

  7. C.B. Dornan. Tcl + Haskell = TclHaskell. In Proc. 1998 Glasgow FP Group Workshop, Pitlochry, Scotland, September 1998. see also http://www.dcs.gla.ac.uk/~nww/TkHaskell/TkHaskell.html.

  8. S.O. Finne and S.L. Peyton Jones. Composing Haggis. In Proc. 5th. Eurographics Workshop on Programming Paradigms for Computer Graphics. Springer-Verlag, September 1995.

    Google Scholar 

  9. S.O. Finne, D. Leijen, E. Meijer, and S.L. Peyton Jones. H/Direct: A Binary Foreign Language Interface for Haskell. In Proc. 1998 International Conference on Functional Programming, (ICFP’98), Baltimore, 1998.

    Google Scholar 

  10. R. Gordon. Essential JNI: Java Native Interface. Prentice Hall PTR, March 1998. ISBN 0-13-679895-0.

    Google Scholar 

  11. Object Management Group. OMG Home Page. http://www.omg.org/, 1999.

  12. J. C. Peterson, K. Hammond, L. Augustsson, B. Boutel, F. W. Burton, J. Fasel, A. D. Gordon, R. J. M. Hughes, P. Hudak, T. Johnsson, M. P. Jones, E. Meijer, S. L. Peyton Jones, A. Reid, and P. L. Wadler. Report on the Non-Strict Functional Language, Haskell, Version 1.4, Yale University, 1997. Available at http://haskell.org.

  13. K. Hammond, J. C. Peterson, L. Augustsson, B. Boutel, F. W. Burton, J. Fasel, A. D. Gordon, R. J. M. Hughes, P. Hudak, T. Johnsson, M. P. Jones, E. Meijer, S. L. Peyton Jones, A. Reid, and P. L. Wadler. The Haskell Library Report, Version 1.4, Yale University, 1997. Available at http://haskell.org.

  14. Hugs Home Page. http://www.haskell.org/hugs/, January 1999.

  15. Java Technology Home Page. http://java.sun.com/, January 1999.

  16. Microsoft Technologies for Java Home Page. http://www.microsoft.com/java/, January 1999.

  17. JavaSoft. Java Native Interface Specification, Release 1.1 (Revised May, 1997). ftp://ftp.javasoft.com/docs/jdk1.1/jni.ps, May 1997. For later modifications, see documentation of JDK1.2betaX.

  18. JavaSoft. Java Development Kit, Version 1.2. http://java.sun.com/products/jdk/1.2/, January 1999. See the online documentation. JDK 1.2 was released in December 1998 as Java 2.

  19. S.L. Peyton Jones and M.P. Jones. First-Class Modules for Component-Based Programming. http://research.microsoft.com/Users/simonpj/Papers/first-class-modules.ps.gz, April 1996.

  20. S.L. Peyton Jones, E. Meijer, and D. Leijen. Scripting COM Components in Haskell. In Proc. 5th. International Conference on Software Reuse, Victoria, British Columbia, June 1998.

    Google Scholar 

  21. Microsoft. Component Object Model (COM). http://www.microsoft.com/com/default.asp, January 1999.

  22. Microsoft. Integrating Java and COM. Follow links “Technical Information” and “Technical Articles” at [16], January 1999.

    Google Scholar 

  23. R. Noble. Lazy Functional Components for Graphical User Interfaces. PhD thesis, Department of Computer Science, University of York, November 1995.

    Google Scholar 

  24. The Green Card Team. The Green Card Manual (version 2.0). http://www.dcs.gla.ac.uk/fp/software/green-card/, January 1999.

  25. The Haskell FFI Team. A primitive foreign function interface (draft specification). Follow the link to the “Primitive FFI design document” on http://www.dcs.gla.ac.uk/fp/software/hdirect/, June 1998.

  26. D. Wakeling. A Haskell to Java Virtual Machine Code Compiler,. In C. Clack, A.J.T. Davie and K. Hammond, editors, Proc. 9th. International Workshop on the Implementation of Functional Languages (IFL’97), St Andrews, Scotland, September 1997, volume 1467 of LNCS, pages 39–52. Springer-Verlag, 1998.

    Google Scholar 

  27. D. Wakeling. Mobile Haskell: Compiling Lazy Functional Programs for the Java Virtual Machine. In Proc. Principles of Declarative Programming (PLILP’98), Pisa, Italy, pages 335–352. Springer-Verlag, September 1998.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Reinke, C. (1999). Towards a Haskell/Java Connection. In: Hammond, K., Davie, T., Clack, C. (eds) Implementation of Functional Languages. IFL 1998. Lecture Notes in Computer Science, vol 1595. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48515-5_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-48515-5_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66229-7

  • Online ISBN: 978-3-540-48515-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics