This repository was archived by the owner on Dec 5, 2019. It is now read-only.
This repository was archived by the owner on Dec 5, 2019. It is now read-only.
C functions for creating blocks from Haskell #1
Open
Description
The project's Objective-C component could expose a set of functions which create some standard block types (e.g., NSComparator
, enumeration blocks, etc.) from a function pointer and some context. Then Haskell code can pass in function pointers and receive an opaque block (typed as an Id
) in return.
typedef BOOL (*OHEnumerationFunction)(id, NSUInteger, HsStablePtr);
id OHEnumerationBlockWithFunction (OHEnumerationFunction, HsStablePtr);