

Mathew de Detrich deteego at gmail.com
Sat Aug 7 21:08:30 EDT 2010


In my opinion the most "reliable" approach would actually to produce the C
that wraps around NDK (for any code that could be possible) which would
obviously interface with the Java libraries. Probably the biggest bane of
Android is the fact that its able to run on almost all machines means that
there *would* be issues using LLVM to just produce code for the generic ARM.

Using the NDK + Java would mean any app written in Haskell would work on any
android device. Of course as mentioned above, there are issues with this.
Its a lot of work for one thing, and the GC for Java is probably not the
best suited for Haskell structured programs. Also iirc, in order to make
"official" Android apps which can go on the market place, you are basically
forced to use the Java API + NDK for any native code, and you have to use
the Java API to interface with the android GUI/World (you can't make an
proper Android app just using NDK which complicates things further). The GC
issue I guess could be solved by generating JVM code (instead of Java
"code") which would give more freedom for GHC to generate code more suited
to Haskell

If this ever ended up happening, it does have the advantage that when one
would develop an app for Android using Haskell, GHC (or whatever compiler we
would use) can use NDK for as much code as possible and only resorting to
Java libraries when required which can of course equate to creating very
fast Android Apps using a productive language (Haskell)

As Don mentioned through, we need a java runtime for GHC.
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100807/5e6651bc/attachment.html

More information about the Haskell-Cafe mailing list