import Foreign (free)
import Foreign.C.String (CString, withCString, peekCString)



foreign import ccall unsafe "string.h strdup" strdup :: CString -> IO CString

testC = withCString "Hello World!" 
        (\s -> 
         do s2 <- strdup s
            s2_hs <- peekCString s2 
            putStrLn s2_hs
            free s2)