ffi002_c.c 341 Bytes
Newer Older
rrt's avatar
rrt committed
1
#include <stdio.h>
2
#include "ffi002_stub.h"
rrt's avatar
rrt committed
3

4
5
6
// XXX shouldn't be required
#include "Rts.h"

rrt's avatar
rrt committed
7
8
#include "RtsAPI.h"

ken's avatar
ken committed
9
extern void __stginit_Foo ( void );
rrt's avatar
rrt committed
10

11
int main(int argc, char *argv[])
rrt's avatar
rrt committed
12
13
14
{
  int i;

15
  startupHaskell(argc, argv, __stginit_Foo);
rrt's avatar
rrt committed
16
17
18
19
20
21
22
23
24

  for (i = 0; i < 5; i++) {
    printf("%d\n", foo(2500));
  }

  shutdownHaskell();

  return 0;
}