C有Haskell / ML-like编译器吗? [英] Is there a Haskell/ML-like compiler to C?

查看:145
本文介绍了C有Haskell / ML-like编译器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

人们 游戏。因为(某些)Scheme编译器编译为C,所以很容易与Objective-C混合并与XCode集成。



我是知道 of 补丁用于Haskell和OCaml编译器,以启用ARM / iOS后端。但这些看起来是非官方的和实验性的/不稳定的。

我更喜欢使用Scheme的动态类型的静态haskell / ML类型的系统。是否有一个稳定的ML / SML / Haskell编译器生成C代码,以便可以像Scheme / Gambit-C一样使用它? 解决方案

我无法帮助ML,但是你看过 JHC 吗? JHC是一个优化Haskell编译器的整体程序,其目标是可移植的C,并且可以通过将

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

in〜 /.jhc/targets.ini

更多Haskell信息位于 Haskell Wiki 和JHC手册。

People have written games for the iPhone in Scheme. Because (some) Scheme-compilers compile down to C, it was easy to mix with Objective-C and integrate with XCode.

I am aware of patches for Haskell and OCaml compilers to enable ARM/iOS-backends. But those appear unofficial and experimental/unstable.

I prefer a static haskell/ML-type type-system over Scheme's dynamic typing. Is there a stable ML/SML/Haskell compiler which generates C-code so that it can be used in a similar way as Scheme/Gambit-C?

解决方案

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.

这篇关于C有Haskell / ML-like编译器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆