Frage

have geschrieben Spiele für das iPhone in Schema . Da (einige) Schema-Compiler C kompilieren nach unten, war es leicht, mit Objective-C und integrierte mit XCode zu mischen.

Ich bin bewusst von Patches für Haskell und OCaml Compiler ermöglichen ARM / iOS-Backends. Aber diejenigen, erscheinen nicht offiziell und experimentelle / instabil.

Ich ziehe eine statische Haskell / ML-Typ Typ-System über Scheme dynamische Typisierung. Gibt es eine stabile ML / SML / Haskell Compiler, so C-Code erzeugt, dass es in ähnlicher Weise wie Scheme / Gambit-C verwendet werden kann?

War es hilfreich?

Lösung

I can't help with ML, but have you looked at JHC? JHC is a whole-program optimizing Haskell compiler that targets portable C, and iPhone support can be added by putting

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

in ~/.jhc/targets.ini

More Haskell information is on the Haskell wiki and the JHC manual.

Andere Tipps

(I am not certain that this toolchain has been attempted specifically on the IPhone yet.)

MLTon is a whole-program optimizing Standard ML compiler. You can keep around your C code by passing -keep g to MLTon at compilation, e.g:

c:/Program Files (x86)/MLton/bin/mlton.bat" -verbose 1 -keep g test.sml

It can also generate ARM code natively.

nhc98: http://www.haskell.org/nhc98/

Full Haskell '98. Of course many libs now rely on more advanced ghc-only features. But Haskell '98 is plenty capable for general purpose programming.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top