First of all, I find it striking that you are using the declaration: foreign import ccall unsafe "rs232.h closecport" c_closecport :: CInt -> CInt
and that it actually works. I would think the only workable declaration would be: foreign import stdcall unsafe "rs232.h closecport" closecport :: IO () You've tried the signature with `stdcall` and `IO ()` and it doesn't work at all? Likewise, your signature for `c_sendmsg` strikes me as perilous. It should result in a value in `IO`. However, let's ignore all that for now. I wonder, does the Haskell always call `closecport`? Maybe you could put in a print statement in the C to find out? -- Jason Dusek _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
