On 25 Apr 2011, at 08:16, Eric Stansifer wrote:
Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert
Haskell Strings to CStrings. (If I understand correctly, c2h . h2c
=== id, but h2c . c2h is not the identity on all inputs;
That is correct. CStrings are 8-bits, and Haskell
Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert
Haskell Strings to CStrings. (If I understand correctly, c2h . h2c
=== id, but h2c . c2h is not the identity on all inputs;
That is correct. CStrings are 8-bits, and Haskell Strings are 32-bits.
Converting from Haskell to C
On 26 Apr 2011, at 13:31, Eric Stansifer wrote:
Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert
Haskell Strings to CStrings. (If I understand correctly, c2h . h2c
=== id, but h2c . c2h is not the identity on all inputs;
That is correct. CStrings are 8-bits, and Haskell
I have been reading Foreign.C.String but it does not seem to provide
the functionality I was looking for.
Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert
Haskell Strings to CStrings. (If I understand correctly, c2h . h2c
=== id, but h2c . c2h is not the identity on all inputs;