On 09 March 2006 16:39, Bulat Ziganshin wrote:
Hello Simon,
Thursday, March 9, 2006, 5:08:09 PM, you wrote:
for small home projects you can even use Int and int which
would work in most of Haskell implementations
Yes, and to give a concrete example: HsInt and int are different
types
Hello Marcin,
Thursday, March 9, 2006, 2:20:00 AM, you wrote:
foreign import ccall duma_init :: Int - IO Int
MQK HsInt duma_init(HsInt arg);
MQK Or use int on the C side and CInt on the Haskell side.
MQK fromIntegral can be used for converting integers in Haskell.
for small home projects
Am Donnerstag, 9. März 2006 08:46 schrieb Bulat Ziganshin:
Thursday, March 9, 2006, 2:20:00 AM, you wrote:
foreign import ccall duma_init :: Int - IO Int
MQK HsInt duma_init(HsInt arg);
MQK Or use int on the C side and CInt on the Haskell side.
MQK fromIntegral can be used for converting
Sven Panne wrote:
Am Donnerstag, 9. März 2006 08:46 schrieb Bulat Ziganshin:
Thursday, March 9, 2006, 2:20:00 AM, you wrote:
foreign import ccall duma_init :: Int - IO Int
MQK HsInt duma_init(HsInt arg);
MQK Or use int on the C side and CInt on the Haskell side.
MQK fromIntegral can be
Hello Brian,
Wednesday, March 8, 2006, 12:03:27 AM, you wrote:
BH mycallback :: GUIMonad m = EventInfo - m EventResult
BH 'm' will have to combine a state monad with the IO monad (so I can use IORef
BH etc if needed).
as Ian Lynagh wrote, it's no problem if your monad is IO-based. if FFI
by
Brian Hulley [EMAIL PROTECTED] writes:
I've got a Haskell module with the following ffi import:
foreign import ccall duma_init :: Int - IO Int
However my problem is that I've got no idea what the type signature
for the corresponding C function should be,
HsInt duma_init(HsInt arg);
Or use
Hi -
I've got a Haskell module with the following ffi import:
foreign import ccall duma_init :: Int - IO Int
However my problem is that I've got no idea what the type signature for the
corresponding C function should be, and when I compile the above module with
ghc -fglasgow-exts -fffi --make
Hello Brian,
Tuesday, March 7, 2006, 7:35:27 PM, you wrote:
BH foreign import ccall duma_init :: Int - IO Int
int duma_init(int);
BH I've tried looking at the wiki but that only seems to give specific
BH examples. I'm trying to find what the mapping is between Haskell function
BH signatures
On Tue, Mar 07, 2006 at 04:35:27PM -, Brian Hulley wrote:
A third point is, how would I pass an arbitrary monad instead of just using
IO?
What for? IO is the monad that most closely matches the imperative, C
semantics. That's why FFI only supports the IO monad (and pure
functions). Other
On Tue, Mar 07, 2006 at 07:57:50PM +0100, Tomasz Zielonka wrote:
On Tue, Mar 07, 2006 at 04:35:27PM -, Brian Hulley wrote:
A third point is, how would I pass an arbitrary monad instead of just using
IO?
What for? IO is the monad that most closely matches the imperative, C
semantics.
Bulat Ziganshin wrote:
Hello Brian,
Tuesday, March 7, 2006, 7:35:27 PM, you wrote:
foreign import ccall duma_init :: Int - IO Int
int duma_init(int);
Also, I really wanted to be able to use () - IO () but () doesn't
seem to be allowed in FFI...
void f(void);
foreign import ccall f :: IO
11 matches
Mail list logo