Update examples
This commit is contained in:
2
testsuite/eval/foreign_should_fail/Makefile
Normal file
2
testsuite/eval/foreign_should_fail/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
TOP=../../..
|
||||
include ../../foreign.mk
|
0
testsuite/eval/foreign_should_fail/dont_test
Normal file
0
testsuite/eval/foreign_should_fail/dont_test
Normal file
2
testsuite/eval/foreign_should_fail/expected
Normal file
2
testsuite/eval/foreign_should_fail/expected
Normal file
@ -0,0 +1,2 @@
|
||||
<eval>:1: parse error on input `in'
|
||||
failed!
|
1
testsuite/eval/foreign_should_fail/expected.604
Normal file
1
testsuite/eval/foreign_should_fail/expected.604
Normal file
@ -0,0 +1 @@
|
||||
failed!
|
1
testsuite/eval/foreign_should_fail/expected.605
Normal file
1
testsuite/eval/foreign_should_fail/expected.605
Normal file
@ -0,0 +1 @@
|
||||
failed!
|
16
testsuite/eval/foreign_should_fail/main.c
Normal file
16
testsuite/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