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

extern HsInt add_one_hs(HsInt a0);

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