Import hs-plugins cvs
This commit is contained in:
16
examples/eval/foreign_should_fail/main.c
Normal file
16
examples/eval/foreign_should_fail/main.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "EvalHaskell.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int *p;
|
||||
hs_init(&argc, &argv);
|
||||
p = hs_eval_i("show $ case 1 + 2 in{-wrong-} x -> x");
|
||||
if (p == NULL)
|
||||
printf("failed!\n");
|
||||
else
|
||||
printf("%d\n",*p);
|
||||
hs_exit();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user