@@ -21,6 +21,14 @@ Option (1) has the disadvantage that all class initialisation code needs to be e
We require the programmer to supply headers for all Objective-C classes implemented in Haskell. This enables the Objective-C compiler to do type checking and enables Interface Builder to recognises properties used as outlets.
Following the structure of the C FFI, the basic Objective-C FFI has two major components: (1) an extension of the Haskell language by new forms of `foreign` declarations and (2) a standard library. The C FFI uses the `ccall` (and `stdcall`) calling convention for `foreign` declarations, whereas Objective-C uses the new `objc` calling convention. The C-specific FFI library is `Foreign.C` (aka `CForeign`) and, for Objective-C, we use `Foreign.ObjectiveC`.
In addition to the low-level FFI, higher-level libraries and tools may provide more convenient APIs. In particular, the basic FFI makes no attempt to model Objective-C's class hierarchy and overloading of selectors in Haskell's type system. This is the responsibility of higher-level libraries.
@@ -31,11 +39,14 @@ We discuss the following subtopics on separate pages:
-\[ObjectiveC/Classes Objective-C classes\]
-\[ObjectiveC/Naming Naming conventions\] (they are not enforced, but recommended)