C.Types
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Mon Sep 6 10:01:26 EDT 2004
"Daniel Müller" <danielmu at gmx.de> writes:
> foreign import ccall calc :: CInt -> CInt -> CInt
>
> calculate :: Int -> Int -> CalcType
> calculate a b
> | ...
> | ...
> | otherwise = calc a b
>
>
> Unfortunately I got an error. What shall I do?
Use fromIntegral to convert between CInt and Int, and something for
CalcType depending on what it is.
(It would help if you told *what* error, but I guessed.)
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the FFI
mailing list