
Hello! Would be possible for GHC to emit Java bytecode? There seems to be some code in GHC's sources (in ghc/compiler/javaGen/) suggesting that it was anticipated. I suppose most of the work would be in making a java RTS and libraries. I am mainly interested in making GHC more portable. Haskell is a great application programming language, but there are some concerns about portability of applications. Perhaps I shouldn't be looking at java bytecode for a solution... Is it possible that a C-- backend will make GHC more portable? Best regards, Tomasz

Hello Tomasz,
I am mainly interested in making GHC more portable. Haskell is a great application programming language, but there are some concerns about portability of applications.
What kind of concerns? We develop an application with GUI, a lot of file I/O and that interfaces with a C++ library. It compiles fine on Windows and Linux. If the C++ library would be available for the Mac, we could compile it on MacOS X, too. Cheers, Arjan

On Tue, Dec 21, 2004 at 10:41:01PM +0100, Arjan van IJzendoorn wrote:
Hello Tomasz,
I am mainly interested in making GHC more portable. Haskell is a great application programming language, but there are some concerns about portability of applications.
What kind of concerns?
For example, some darcs users complain about problems with building darcs on some exotic platforms (ie not Linux, OS X, Windows, FreeBSD). It would be nice if it was possible to distribute a .jar file for all such platforms. Best regards, Tomasz

Tomasz Zielonka
For example, some darcs users complain about problems with building darcs on some exotic platforms (ie not Linux, OS X, Windows, FreeBSD). It would be nice if it was possible to distribute a .jar file for all such platforms.
Perhaps making -keep-hc-files a bit more documented would be one solution. Adding a feature to Cabal for building a tarball of .hc files generated from the haskell sources and a shell script for building the the library/executables from those. This could be faster and easier to implement than creating a version of the RTS running under the JVM. - Einar Karttunen

Einar Karttunen writes:
Tomasz Zielonka
writes: For example, some darcs users complain ...
Perhaps making -keep-hc-files a bit more documented ...
This could be faster and easier to implement than creating a version of the RTS running under the JVM. ==============
More generally: do you (Tomasz and others) really think that Java, or even C/C++ is a good "portable" platform for implementing efficiently Haskell or other lazy functional languages?? I believe this has been discussed already. And GHC passed already through this stage. I don't believe the world can return to it. The RT model is different, even decently implemented tail recursion is not so easy in C, and in Java I wouldn't bet either. Moreover, I don't think that Haskell is a good way to perpetuate imperative languages as "portable platforms". While Lisp machine belongs to the past, it seems reasonable to hope that "functional hardware", with some universal implementation paradigms, will be more popular... Jerzy Karczmarczuk

A lot of phones run java bytecode. It would be nice (and rather cool) to be able to write midlets in Haskell in addition to Java.... (And there would be some irony in being able to do this in Haskell but not in Erlang on Ericson phones!) -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com On Wed, 22 Dec 2004 karczma@info.unicaen.fr wrote:
Einar Karttunen writes:
Tomasz Zielonka
writes: For example, some darcs users complain ...
Perhaps making -keep-hc-files a bit more documented ...
This could be faster and easier to implement than creating a version of the RTS running under the JVM. ==============
More generally: do you (Tomasz and others) really think that Java, or even C/C++ is a good "portable" platform for implementing efficiently Haskell or other lazy functional languages??
I believe this has been discussed already. And GHC passed already through this stage. I don't believe the world can return to it. The RT model is different, even decently implemented tail recursion is not so easy in C, and in Java I wouldn't bet either.
Moreover, I don't think that Haskell is a good way to perpetuate imperative languages as "portable platforms". While Lisp machine belongs to the past, it seems reasonable to hope that "functional hardware", with some universal implementation paradigms, will be more popular...
Jerzy Karczmarczuk
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

I know at one time GHC had partially-working support for emitting
bytecode with the "-J" switch -- see fptools/ghc/compiler/javaGen.
Does anybody know what became of it? Any documentation beyond the
source?
- a
"S. Alexander Jacobson"
A lot of phones run java bytecode.
It would be nice (and rather cool) to be able to write midlets in Haskell in addition to Java....
(And there would be some irony in being able to do this in Haskell but not in Erlang on Ericson phones!)
-Alex-
______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
On Wed, 22 Dec 2004 karczma@info.unicaen.fr wrote:
Einar Karttunen writes:
Tomasz Zielonka
writes: For example, some darcs users complain ...
Perhaps making -keep-hc-files a bit more documented ...
This could be faster and easier to implement than creating a version of the RTS running under the JVM. ==============
More generally: do you (Tomasz and others) really think that Java, or even C/C++ is a good "portable" platform for implementing efficiently Haskell or other lazy functional languages??
I believe this has been discussed already. And GHC passed already through this stage. I don't believe the world can return to it. The RT model is different, even decently implemented tail recursion is not so easy in C, and in Java I wouldn't bet either.
Moreover, I don't think that Haskell is a good way to perpetuate imperative languages as "portable platforms". While Lisp machine belongs to the past, it seems reasonable to hope that "functional hardware", with some universal implementation paradigms, will be more popular...
Jerzy Karczmarczuk
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-- I wrote my own mail server and it still has a few bugs. If you send me a message and it bounces, please forward the bounce message to megacz@gmail.com. Thanks!
participants (6)
-
Adam Megacz
-
Arjan van IJzendoorn
-
Einar Karttunen
-
karczma@info.unicaen.fr
-
S. Alexander Jacobson
-
Tomasz Zielonka