top | item 4092324

ARM is now a fully supported target platform for GHC Haskell

115 points| dons | 13 years ago |haskell.org | reply

27 comments

order
[+] james4k|13 years ago|reply
So...what would be needed to see native Haskell iOS apps? :)
[+] T_S_|13 years ago|reply
Cross compilation is not yet supported. You want to build on osx/intel and target ios/arm. Not yet. ghc still needs to target the platform it was built on.
[+] eru|13 years ago|reply
Doesn't Apple still forbid programs written in anything apart from Objective C, JavaScript (and a third language, that I don't remember)?
[+] cheatercheater|13 years ago|reply
The x86 and x64 have interesting hacks in the asm they generate. For example, thread switching is done not by a conditional jump, but by self-modifying code (there's some nops in the main loop, and they get overwritten with a jmp when it's time to preempt). What cool architecture-specific hacks does the ARM version use?
[+] exDM69|13 years ago|reply
I assume you refer to the co-operative thread switching done by the GHC runtime to achieve co-operative multitasking with Haskell's green threads? I thought this was done by trashing all the registers (pushing live regs to stack) in the compiler back end and then swapping the stack pointer in the runtime. Are you sure about the nop's in the main loop?

I, too, would like to know how this works on ARM and other non-x86 platforms. Do they even have this feature supported on ARM? (ie. compile with ghc --threaded and then add RTS parameters as needed when executing)