Commit 0f3c05f0 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-03-18 13:50:13 by simonmar]

update to use new libraries and non-deprecated features
parent 9f86ec95
......@@ -2,14 +2,14 @@
module ShouldCompile where
import Foreign
import GlaExts
import Int
import Word
import GHC.Exts
import Data.Int
import Data.Word
-- importing functions
foreign import stdcall "m" m_stdcall :: StablePtr a -> IO (StablePtr b)
foreign import ccall unsafe "m" m_ccall :: ByteArray Int -> IO Int
foreign import ccall unsafe "m" m_ccall :: ByteArray# -> IO Int
foreign import stdcall "sin" my_sin :: Double -> IO Double
foreign import stdcall "cos" my_cos :: Double -> IO Double
......@@ -19,15 +19,15 @@ foreign import stdcall "m2" m16 :: IO Int16
foreign import stdcall "m3" m32 :: IO Int32
foreign import stdcall "m4" m64 :: IO Int64
foreign import stdcall "dynamic" d8 :: Addr -> IO Int8
foreign import stdcall "dynamic" d16 :: Addr -> IO Int16
foreign import stdcall "dynamic" d32 :: Addr -> IO Int32
foreign import stdcall "dynamic" d64 :: Addr -> IO Int64
foreign import stdcall "dynamic" d8 :: Ptr a -> IO Int8
foreign import stdcall "dynamic" d16 :: Ptr a -> IO Int16
foreign import stdcall "dynamic" d32 :: Ptr a -> IO Int32
foreign import stdcall "dynamic" d64 :: Ptr a -> IO Int64
foreign import ccall unsafe "kitchen"
sink :: ForeignObj
-> ByteArray Int
-> MutableByteArray Int RealWorld
sink :: Ptr a
-> ByteArray#
-> MutableByteArray# RealWorld
-> Int
-> Int8
-> Int16
......@@ -43,10 +43,10 @@ foreign import ccall unsafe "kitchen"
foreign import ccall unsafe "dynamic"
sink2 :: Addr
-> (ForeignObj
-> ByteArray Int
-> MutableByteArray Int RealWorld
sink2 :: Ptr a
-> (Ptr b
-> ByteArray#
-> MutableByteArray# RealWorld
-> Int
-> Int8
-> Int16
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment