problems exporting haskell functions
3 Sep
2001
3 Sep
'01
6:47 p.m.
Hello, I have tried to export haskell functions, but I haven't been able to compile anything and obtain a executable file. My program has two parts. - Haskell part: module Hex where fh :: Int -> Int foreign export "f" fh :: Int -> Int fh x = 7 - C part: #include <stdio.h> #include <stdlib.h> extern int f(int x); int main( ){ int a; a = f(5); printf("%d\n",a); return 0; } I have tried to compile it using the glasgow-extensions, but it has links problems. Does anyone know if there is something wrong in my program? Does anyone know where I can find a little example program where haskell functions are exported? Thanks, J.I. GarcĂa
9088
Age (days ago)
9088
Last active (days ago)
0 comments
1 participants
participants (1)
-
Juan Ignacio Garcia Garcia