Commit 250f0268 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix code in library initialisation example (#7471)

parent e4feb52d
......@@ -446,21 +446,25 @@ typedef enum {
implemented in C or C++. For example:</para>
HsBool mylib_init(void){
int argc = ...
char *argv[] = ...
#include &lt;stdlib.h&gt;
#include "HsFFI.h"
HsBool mylib_init(void){
int argc = 2;
char *argv[] = { "+RTS", "-A32m", NULL };
char **pargv = argv;
// Initialize Haskell runtime
hs_init(&amp;argc, &amp;argv);
hs_init(&amp;argc, &amp;pargv);
// do any other initialization here and
// return false if there was a problem
return HS_BOOL_TRUE;
void mylib_end(void){
void mylib_end(void){
<para>The initialisation routine, <literal>mylib_init</literal>, calls
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment