17

Hi i know there are similar questions. But maybe thare are any updates or new libraries in this area. What I'm looking for:

  1. Best practices of writing android appplication in Haskell. I know in c#(monodroid)/java there are millions of samples.
  2. Do you know bloggers, articles which write about android+Haskell

I saw these useful links:

And I understand that I could use

  1. GHC targeting ndk gcc
  2. JHC
  3. What about converting Haskell to C and using NativeActivity? http://developer.android.com/reference/android/app/NativeActivity.html
  4. If you want to do android UI code in Haskell somebody will have to write Haskell bindings to Java through JNI/C

Are there any Haskell, Android experts?

Community
  • 1
  • 1
John
  • 864
  • 1
  • 11
  • 26
  • 3
    I believe a related relevant question would be this: Has anyone actually used Haskell as part of their Android app? afaik the answer is "no"; I'd love to see someone make a complete demonstration of using Haskell for Android apps, but so far all I've seen is theoretical possibilities. – Dan Burton May 14 '11 at 00:02
  • @Dan: http://stackoverflow.com/questions/5827446/haskell-interpreter-on-android/5843340#5843340 mentions http://ipwnstudios.com/ as an example (of cross-compilation of Haskell for Android)... – imz -- Ivan Zakharyaschev May 22 '11 at 13:49
  • Cf. http://git-annex.branchable.com/design/assistant/android/#comment-8b4190ffa50567ca74ef667a7461fcb4 for some experience of creating a static binary for Android from a Haskell program. – imz -- Ivan Zakharyaschev Sep 25 '12 at 21:30

1 Answers1

2

It really depends what you want from your Haskell on Android.

If you want to write Haskell98 code on Android, you can use JHC and create NDK bindings yourself. I

GHC is available on ARM. This should enable using most Hackage packages available in an ARM environment. I've haven't heard much in terms of experience reports working with GHC ARM Builds.

It seems like the inevitable conclusion of functional programmers on Android is to invest your time in Clojure and Scala.

zmanian
  • 426
  • 4
  • 8
  • 3
    GHC runs [on ARM natively](http://packages.debian.org/squeeze/armel/ghc6/download) and is relatively portable to Posix environments. What it is not portable to easily is other VMs (e.g. JVM-ish). – Don Stewart May 13 '11 at 23:09
  • 1
    @John report back and let us know how it goes! – Tyler May 15 '11 at 03:42
  • 3
    I would advise against JHC, and in favor of Hugs. Very few programs run with JHC -- so you'll be fighting the toolchain the whole way. – Don Stewart May 16 '11 at 03:16