hosiers
hosiers

Reputation: 39

Translating Haskell to C for use on iPhone

I've written a Haskell library I would like to include in an iPhone app. It makes heavy use of Haskell's functional abilities, currying, etc. and rewriting in Objective-C would be tough.

Is it possible to automatically translate Haskell to C? or dig out an intermediate C representation from one of the compilers?

Apple's developer agreement forbids statically linking one of the lightweight Haskell interpreters, not that I'm keen on that solution.

Upvotes: 2

Views: 1654

Answers (3)

ErikR
ErikR

Reputation: 52049

Have a look at the ghc-ios project:

http://www.reddit.com/r/haskell/comments/1lboh4/announcing_ghc_ios/

Upvotes: 0

Logan Capaldo
Logan Capaldo

Reputation: 40346

I haven't used it but there is http://projects.haskell.org/ghc-iphone/

Upvotes: 4

wnoise
wnoise

Reputation: 9942

http://repetae.net/computer/jhc/ compiles to fairly standard C. It might be possible to use it.

Upvotes: 4

Related Questions