ffi
Compiling ghc with -fPIC support
I\'m trying to install GHC with -fPIC support in Fedora. I\'ve grabbed a source tarball since it seems no binary one has this.[详细]
2023-04-11 06:05 分类:问答Can't install ffi gem, Rails fail
While creating creating an integration test via rails generate integration_test foo it declined with Could not find ffi-1.0.9 in any of the sources[详细]
2023-04-06 01:27 分类:问答How to declare argc, argv in ruby ffi, and how to pass proper values to it?
Answered: What is proper ruby ffi code for this 开发者_Python百科function: void glutInit(int *argc, char ** argv);[详细]
2023-03-29 02:55 分类:问答Haskell Polyvariadic Function With IO
Is it possible to have a function that takes a foreign function call where some of the foreign function\'s arguments are CString an开发者_StackOverflow社区d return a function that accepts String inste[详细]
2023-03-27 05:17 分类:问答Applicative without a functor
I have a type Image which is basically an c-array of floats. It is easy to create functions such as map :: (Float -> Float) -> Image -> Image, or zipWith :: (Float -> Float -> Float) -[详细]
2023-03-27 02:15 分类:问答Call C Functions from Haskell at runtime
I\'m building an interpreter for a dynamic programming language in Haskell. I\'d like to add a simple mechanism to call C functions. In the past, I\'ve used the Haskell F开发者_JAVA技巧FI to call C fu[详细]
2023-03-21 00:08 分类:问答How does one interface with a C enum using Haskell and FFI?
Let\'s say charm.c has an enum key and a function get_key() that returns a key type value. How can I expose a corresponding Haskell Key record and function getKey :: IO Key?[详细]
2023-03-20 09:37 分类:问答How to call the function glMultiDrawElements :: GLenum -> GHC.Ptr.Ptr GLsizei -> GLenum -> GHC.Ptr.Ptr (GHC.Ptr.Ptr a) -> GLsizei -> IO ()
The ffunction glMultiDrawElements requires a pointer to a pointer as 开发者_开发知识库one of its arguments. How might one obtain a Ptr(Ptr a) from a StorableArray Int a ?You need to first marshal your[详细]
2023-03-19 18:14 分类:问答How to call a function of type Ptr GLubyte -> IO() in Haskell
In the OpenGL Raw library is the following function: glPolygonStipple :: Ptr开发者_StackOverflow GLubyte -> IO ()[详细]
2023-03-17 22:12 分类:问答Using the Haskell FFI to marshal structs; also, how to use FunPtr
I have some questions about the ffi in haskell. first of all i\'m trying to work with c st开发者_Go百科ructs in haskell.[详细]
2023-03-11 09:11 分类:问答