hsc2hs: Mutate a C struct with Haskell
问题 I am trying to write a Haskell program that communicates with C (ultimately for iOS via GHC-iOS). I want it to pass a string from C to Haskell, have Haskell process it and then return some Data types from Haskell to C Structs via hsc2s. I have been unsuccessful at finding a clear, simple tutorial. The only thing Haskell needs from C is the String, nothing else. I have no trouble with the very first part, passing a string to Haskell. testPrint :: CString -> IO () testPrint c = do s <-