| Experienced mac/iphone/haskell/gnu developer. Maintaining and clean GL and AL wrappers, and cleaner ObjC integration which allows to develop Cocoa apps. (can provide and also port to iPhone), and defunct Xcode haskell plugin considered to be rewritten.

+

| Haskell-to-iPhone compiler, tricky iPhone stuff, GHCi

+

| Games, roguelike, scrolling shooter - Realtime game and procedural development visualization engines and environment, animation and music apps

### iPhone OS is mostly a vanilla OS X, running on [[ARM]]. Syscall numbers, the object format, and the kinds of things that are available on it are all pretty much the same as OS X. The main difference is the architecture. Word size etc. are mostly the same as other platforms that are already supported, so I don't think much more is needed for an unregistered built, at least.

+

# Do apps have to be signed in some way?

# Do apps have to be signed in some way?

+

## Yes, unless you're on a jailbroken platform. On Mac OS 10.5 and up, there is a program called codesign that takes an identity (with an associated private key) and signs the provided binary. Although I don't think the source for this program is publicly available, what it actually does is reasonably simple and could be ported to multiple platforms quite easily (especially given the macho library on hackage).

Jhc has full support for cross compiling to the iPhone. Information on how to do so is in the jhc manual under [http://repetae.net/computer/jhc/manual.html#crosscompilation Cross Compilation]. Basically, you just add the following to your ~/.jhc/targets.ini

Experienced mac/iphone/haskell/gnu developer. Maintaining and clean GL and AL wrappers, and cleaner ObjC integration which allows to develop Cocoa apps. (can provide and also port to iPhone), and defunct Xcode haskell plugin considered to be rewritten.

Haskell-to-iPhone compiler, tricky iPhone stuff, GHCi

Games, roguelike, scrolling shooter - Realtime game and procedural development visualization engines and environment, animation and music apps

There are at least two ways to use Haskell to make iPhone apps.
One is having a Haskell-to-iPhone compiler, which would probably cross-compile from another host environment (probably Mac OS X).
Another way is to write Haskell programs that generate iPhone-compatible code when run (rather than when compiled), based on an embedded DSL, similarly to Compiling Embedded Languages.

3 GHC as a cross compiler

Now that GHC can be used as a cross compiler again we should document what is left in getting GHC to compile apps for the iPhone.

Can the RTS be ported to the iPhone?

How much work is this?

iPhone OS is mostly a vanilla OS X, running on ARM. Syscall numbers, the object format, and the kinds of things that are available on it are all pretty much the same as OS X. The main difference is the architecture. Word size etc. are mostly the same as other platforms that are already supported, so I don't think much more is needed for an unregistered built, at least.

Do apps have to be signed in some way?

Yes, unless you're on a jailbroken platform. On Mac OS 10.5 and up, there is a program called codesign that takes an identity (with an associated private key) and signs the provided binary. Although I don't think the source for this program is publicly available, what it actually does is reasonably simple and could be ported to multiple platforms quite easily (especially given the macho library on hackage).

Haskell code should be compiled into static library.

Because custom dynamically linked libraries are not allowed in regular iOS (not jail-breaken).

4 Jhc as a cross compiler

Jhc has full support for cross compiling to the iPhone. Information on how to do so is in the jhc manual under Cross Compilation. Basically, you just add the following to your ~/.jhc/targets.ini

[iphone]
cc=arm-apple-darwin-gcc
merge=le32

and then invoke jhc with the --cross and -miphone options.

5 Other ways to stay in touch

Chat with us on the #haskell-iphone IRC channel on freenode.
Does anyone know how to set up channel logging?