Go to the first, previous, next, last section, table of contents.

Calling C directly from Haskell

SINCE VERSION 0.22: "Literal-literals", e.g., `"NULL"', can now be any `boxed-primitive' type -- they are not automatically taken to be `_Addr's. This is cool, except you may sometimes have to put in a type signature to force the desired type.

SINCE VERSION 0.19: `ccall' and `casm' have been renamed to `_ccall_' and `_casm_' and `veryDangerousCcall' and `veryDangerousCasm' have been removed. It is no longer necessary (nor legal!) to unbox/rebox the arguments and results to `_ccall_'. GHC does the unboxing/reboxing for you.

GOOD ADVICE: Because this stuff is not Entirely Stable as far as names and things go, you would be well-advised to keep your C-callery corraled in a few modules, rather than sprinkled all over your code. It will then be quite easy to update later on.

WARNING AS OF 0.26: Yes, the `_ccall_' stuff probably will change, to something better, of course! We are only at the musing-about-it stage, however.


Go to the first, previous, next, last section, table of contents.