
12 Feb
2007
12 Feb
'07
3:54 a.m.
Bulat Ziganshin wrote:
examples of lifting C functions into Haskell world:
mysin :: Double -> Double mysin = realToFrac . c_mysin . realToFrac
-- c_mysin :: CDouble -> CDouble
rnd :: Int -> IO Int rnd x = do r <- c_rnd (fromIntegral x) return (fromIntegral r)
-- c_rnd :: CInt -> IO CInt
OK, got it. I'll put that in. Thanks, Yitz