[Haskell-cafe] Re: Libraries for Commercial Users

Brad Larsen brad.larsen at gmail.com
Sat Oct 10 14:47:49 EDT 2009


John,

On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes <john at n-brain.net> wrote:
[...]
> JVM is cross-platform, and contains sufficient typing information to
> permit one to write something like, "import foreign jvm
> java.list.Collection", and have typed access to the whole class and all of
> its methods.
[...]

Having painless Haskell <- Java interoperability would be great.  I'm
curious though:  could it really be so simple as a one-line ``import
foreign jvm'' directive?  I imagine the purity mismatch between
Haskell and Java would be very troublesome.

With this hypothetical ``import foreign jvm'' mechanism, what would
the be type of imported Java stuff?  Would it all be done in IO?

The more I think about it, the trickier it seems.  Beside the purity
mismatch of Haskell and Java, there is an OO/functional mismatch.

Haskell / Java interop could be a huge boon; I just have trouble
seeing how it could be so simple as a one-line import in your Haskell
code.

Sincerely,
Brad


More information about the Haskell-Cafe mailing list