Update examples
This commit is contained in:
2
testsuite/eval/foreign_eval1/Makefile
Normal file
2
testsuite/eval/foreign_eval1/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
TOP=../../..
|
||||
include ../../foreign.mk
|
0
testsuite/eval/foreign_eval1/dont_test
Normal file
0
testsuite/eval/foreign_eval1/dont_test
Normal file
1
testsuite/eval/foreign_eval1/expected
Normal file
1
testsuite/eval/foreign_eval1/expected
Normal file
@ -0,0 +1 @@
|
||||
10946
|
16
testsuite/eval/foreign_eval1/main.c
Normal file
16
testsuite/eval/foreign_eval1/main.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "EvalHaskell.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *p;
|
||||
hs_init(&argc, &argv);
|
||||
p = hs_eval_s("show $ let fibs = 1:1:zipWith (+) fibs (tail fibs) in fibs !! 20");
|
||||
if (p == NULL)
|
||||
printf("failed!\n");
|
||||
else
|
||||
printf("%s\n",p);
|
||||
hs_exit();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user