Re: Use of H98 FFI

2003-08-03 Thread Manuel M T Chakravarty
Peter Thiemann [EMAIL PROTECTED] wrote, I recently had my first exposure to Haskell's FFI when I was trying to compute MD5 and SHA1 hashes using the existing C implementations. In each case, the idea is to make the hash function available as function md5 :: String - String However, the

Re: Use of H98 FFI

2003-08-01 Thread Sven Panne
Peter Thiemann wrote: md5 :: String - String Hmmm, this should probably be: md5 :: [Word8] - [Word8] unless you really want the MD5 of the Unicode characters... Cheers, S. ___ Haskell mailing list [EMAIL PROTECTED]

Re: Use of H98 FFI

2003-08-01 Thread Derek Elkins
On 01 Aug 2003 09:44:14 +0200 Peter Thiemann [EMAIL PROTECTED] wrote: I recently had my first exposure to Haskell's FFI when I was trying to compute MD5 and SHA1 hashes using the existing C implementations. In each case, the idea is to make the hash function available as function md5 ::

Re: Use of H98 FFI

2003-08-01 Thread Peter Thiemann
Derek == Derek Elkins [EMAIL PROTECTED] writes: Derek Derek Except that I would probably mapM_ over a list of chunks, I don't Derek see what the problem is with your second version of the code is. The second version allocates memory like crazy, so much that the pokeByteOff and