about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tests/cc_haskell_import/main.c
blob: 661174e5df49a38b405195969469047a5f5118d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
#include "HsFFI.h"

extern HsInt32 add_one_hs(HsInt32 a0);

int main(int argc, char *argv[]) {
  hs_init(&argc, &argv);
  printf("Adding one to 5 through Haskell is %d\n", add_one_hs(5));
  hs_exit();
  return 0;
}