
20 Jun
2001
20 Jun
'01
6:37 a.m.
Hello, I want to pass a String to a function which is imported from C code: foreign import "pass" prim_pass :: String -> String The declaration above gives me an error from ghc like "String type not supported for imported functions". I thought that String being [Char] should be supported (somehow like a definition with "newtype" keyword). Can you tell me how can I pass strings to and from C code, as simple as possible (I know about HDirect, but I couldn't make it work for me: red-hat 7.1, ghc 5.00)? Best regards, Corneliu