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”
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Software AG. EntireX DCOM Release. http://www.softwareag.com/corporat/solutions/entirex/, January 1999.
L. Augustsson. The HBC compiler. http://www.cs.chalmers.se/~augustss/hbc/hbc.html, January 1999.
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.
P. Bothner. Kawa-Compiling Dynamic Languages to the Java VM. In Proc. Usenix Conference in New Orleans, June 1998.
K. Claessen, T. Vullinghs, and E. Meijer. Structuring Graphical Paradigms in TkGofer. In Proc. 1997 International Conference on Functional Programming (ICFP’ 97), June 1997.
Tcl/Tk Consortium. Home Page. http://www.tclconsortium.org/, 1999.
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.
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.
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.
R. Gordon. Essential JNI: Java Native Interface. Prentice Hall PTR, March 1998. ISBN 0-13-679895-0.
Object Management Group. OMG Home Page. http://www.omg.org/, 1999.
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.
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.
Hugs Home Page. http://www.haskell.org/hugs/, January 1999.
Java Technology Home Page. http://java.sun.com/, January 1999.
Microsoft Technologies for Java Home Page. http://www.microsoft.com/java/, January 1999.
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.
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.
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.
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.
Microsoft. Component Object Model (COM). http://www.microsoft.com/com/default.asp, January 1999.
Microsoft. Integrating Java and COM. Follow links “Technical Information” and “Technical Articles” at [16], January 1999.
R. Noble. Lazy Functional Components for Graphical User Interfaces. PhD thesis, Department of Computer Science, University of York, November 1995.
The Green Card Team. The Green Card Manual (version 2.0). http://www.dcs.gla.ac.uk/fp/software/green-card/, January 1999.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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