Re: calling haskell from C from haskell

2003-01-03 Thread Alastair Reid
> Hello, Is calling haskell from C from haskell possible? This is what > i tried (generated with green-card): It ought to work. Instead of using Greencard (which only supports Haskell->C) or the old _casm_ operation, I'd recommend using the new foreign function inte

calling haskell from C from haskell

2003-01-03 Thread Arjen Hommersom
Hello, Is calling haskell from C from haskell possible? This is what i tried (generated with green-card): {-# OPTIONS -#include "Main_stub.h" #-} module Main where import StdDIS foreign export ccall foo :: Int -> Int foo i = i+1 bar :: Int -> IO Int bar arg1 = _casm_ ``