Re: [Haskell-cafe] [Haskell-beginners] ghc and android

On 12/30/2012 03:43 PM, Brandon Allbery wrote:
On Sun, Dec 30, 2012 at 8:19 AM, Nathan Hüsken
wrote: Is it currently possible to build haskell programs for android using the android NDK? If course, I know, bindings have to be written and android GUIs have to be written in Java. But if I would write the bindings for the things I need...?
GUIs can be written without requiring Java/Dalvik, at least on the more recent versions of Android. It's the basic runtime support that is still a bit lacking, last I checked.
Oh, cool. I did not know that.
Via C/gcc? Its not the fastest, but should work, should it not?
It's nonexistent for ARM; to get a working -fvia-C you have to go back to ghc versions that don't have any clue about ARM (if you want to scare yourself, check out via-C's Evil Mangler sometime). And I think the hosted build isn't working at the moment?
Via llvm?
I believe this is how current ARM development is doing it, rather than try to code up a native code generation backend. (I also get the impression that the NCGs are going to be deprecated in favor of -fllvm at some point, although they want to clean up some lingering optimization issues first; llvm wins for many things but does somewhat poorly for a few.)
An additional issue: ghci (and Template Haskell because it uses the bytecode interpreter of ghci internally) currently(?) requires its own custom linker instead of being able to use the system linker. Said linker has no support for ARM. The correct fix for this is to redesign ghci so it doesn't need its own linker; there has been some work in this direction, but I don't know how complete it is, and it interacts with other issues such as building Haskell libraries as shared objects.
With ghci, the consol haskell shell is meant, correct? I do not think I would need ghci on android, for what? I think I can live without template haskell.

On Sun, Dec 30, 2012 at 1:46 PM, Nathan Hüsken
An additional issue: ghci (and Template Haskell because it uses the bytecode interpreter of ghci internally) currently(?) requires its own custom linker instead of being able to use the system linker. Said linker has no support for ARM. The correct fix for this is to redesign ghci so it doesn't need its own linker; there has been some work in this direction, but I don't know how complete it is, and it interacts with other issues such as building Haskell libraries as shared objects.
With ghci, the consol haskell shell is meant, correct?
Yes. (Actually, I think they got ghci working at some point, so this may not be relevant.) Also stuff like the hint and mueval libraries rely on the bytecode interpreter/"ghci".
I do not think I would need ghci on android, for what? I think I can live without template haskell.
You can for a while, but you might be surprised what libraries use TH behind the covers. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
Nathan Hüsken