开发者

Translating Haskell to C for use on iPhone

开发者 https://www.devze.com 2023-02-02 15:51 出处:网络
I\'ve written a Haskell library I would like to include开发者_如何学JAVA in an iPhone app.It makes heavy use of Haskell\'s functional abilities, currying, etc. and rewriting in Objective-C would be to

I've written a Haskell library I would like to include开发者_如何学JAVA 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.


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


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


Have a look at the ghc-ios project:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消