summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_run/fptr01_c.c
blob: 0a0e1efe1cc17549222bda09fcecd6fbc06c5029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

#include "HsFFI.h"

#include "fptr01.h"

void f( HsInt *i )
{
    printf( "f%d\n", (int)*i );
    fflush( stdout );
}

void g( HsInt *i )
{
    printf( "g%d\n", (int)*i );
    fflush( stdout );
}

void h( HsInt *i )
{
    printf( "h%d\n", (int)*i );
    fflush( stdout );
}

void f_env( HsInt *env, HsInt *i )
{
    printf( "f_env %d %d\n", *env, (int)*i );
    fflush( stdout );
}