The language-c-inline package
This library provides inline C & Objective-C code using GHC's support for quasi-quotation. In particular, it enables the use of foreign libraries without a dedicated bridge or binding. Here is a tiny example:
nslog :: String -> IO () nslog msg = $(objc ['msg :> ''String] (void [cexp| NSLog(@"Here is a message from Haskell: %@", msg) |]))
For more information, see https://github.com/mchakravarty/language-c-inline/wiki.
New in 0.7.10: Distinction between Class (NSObject pointers) and Struct (C pointers) in both hints and marhsallers.
New in 0.7.9: C wrapper names include the filename to disambiguate linker symbols.
New in 0.7.8: (1) Record marshalling; (2) foreign pointer-class marshalling; (3) custom type marshallers; (4) marshall raw pointer types. Generated _objc.m files now always include HsFFI.h (as the tool can generate type names declared in that header). Marshals Bool as BOOL. Marshal Int and Word to NSInteger and NSUInteger, respectively.
New in 0.6.0: Introduction of explicit marshalling hints (for more flexibility and support of GHC 7.8's untyped Template Haskell quotations)
New in 0.5.0: Marshalling of numeric types
New in 0.4.0: Maybe types are marshalled as pointers that may be nil & bug fixes.
New in 0.3.0: Boxed Haskell types without a dedicated type mapping are marshalled using stable pointers.
New in 0.2.0: Support for multiple free variables in one inline expression as well as for inline code returning void.
New in 0.1.0: We are just getting started! This is just a ROUGH AND HIGHLY EXPERIMENTAL PROTOTYPE.
[Skip to Readme]
|Versions||0.3.0.0, 0.3.0.1, 0.5.0.0, 0.6.0.0, 0.7.6.0, 0.7.6.1, 0.7.7.0, 0.7.8.0, 0.7.9.0, 0.7.9.1, 0.7.9.2, 0.7.10.0 (info)|
|Dependencies||array, base (>=4.0 && <5), containers (>=0.4), filepath (>=1.2), language-c-quote (==0.8.*), mainland-pretty (>=0.2.5), template-haskell [details]|
|Author||Manuel M T Chakravarty|
|Maintainer||Manuel M T Chakravarty <firstname.lastname@example.org>|
|Source repository||head: git clone git://github.com/mchakravarty/language-c-inline.git|
|Uploaded||Tue Nov 1 03:19:23 UTC 2016 by ManuelChakravarty|
|Downloads||1930 total (13 in the last 30 days)|
|Status||Docs not available [build log]
All reported builds failed as of 2016-11-18 [all 3 reports]
|manualtests||Enables tests that require manual intervention.||Disabled||Automatic|
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
For package maintainers and hackage trustees