module CLibrary where import Foreign.C.Types import Foreign.C.String import Foreign.Marshal.Alloc import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable foreign export ccall "testFunction" testFunctionCWrapper :: CString -> IO (Ptr CString) testFunctionCWrapper :: CString -> IO (Ptr CString) testFunctionCWrapper cs = do input <- peekCString cs output1 <- newCString "hello world" output2 <- newCString input newArray [output1, output2]