RE: Looing for advice on profiling

2004-11-10 Thread Simon Marlow
On 09 November 2004 17:04, Duncan Coutts wrote: Are you using BinMem, or BinIO? BinIO Ah. BinIO is going to be a lot slower than BinMem, because it does an hPutChar for each character, whereas BinMem just writes into an array. I never really optimised the BinIO path, because we use

Re: proposal for ghc-pkg to use a directory of .conf files

2004-11-10 Thread Isaac Jones
Simon Marlow [EMAIL PROTECTED] writes: On 08 November 2004 18:47, Duncan Coutts wrote: We can use ghc-pkg at the build / install-into-temp phase to create the $(package).conf files under $TMP_INSTALL_ROOT/usr/lib/ghc-$VER/package.conf.d/ and then final installation is jsut merging files

Marshall Multidimensional list, multidimensional array Part II

2004-11-10 Thread David Lo
Dear all, I try to use the following to convert [[Int]] to C's int[][] : foreign export stdcall doCompForeign :: CString - CString - IO (Ptr (Ptr Int)) doCompForeign :: CString - CString - IO (Ptr (Ptr Int)) doCompForeign patraw cnameraw = let pat = peekCString patraw

RE: proposal for ghc-pkg to use a directory of .conf files

2004-11-10 Thread Simon Marlow
On 09 November 2004 17:36, Isaac Jones wrote: Simon Marlow [EMAIL PROTECTED] writes: On 08 November 2004 18:47, Duncan Coutts wrote: We can use ghc-pkg at the build / install-into-temp phase to create the $(package).conf files under $TMP_INSTALL_ROOT/usr/lib/ghc-$VER/package.conf.d/ and

Re: Marshall Multidimensional list, multidimensional array

2004-11-10 Thread Peter Simons
David Lo writes: [[Int]] to int[][] Pardon me if I'm telling you something you already know, but I wanted to make sure you are aware of it. int[][] is a very different type than [[Int]] is. An int[][] is a pointer to an array of pointers to integers: int[][] == int*[] == int** Now

Re: Marshall Multidimensional list, multidimensional array

2004-11-10 Thread glynn
Peter Simons wrote: [[Int]] to int[][] Pardon me if I'm telling you something you already know, but I wanted to make sure you are aware of it. int[][] is a very different type than [[Int]] is. An int[][] is a pointer to an array of pointers to integers: No it isn't; it's an array of

Re: Marshall Multidimensional list, multidimensional array

2004-11-10 Thread Peter Simons
[EMAIL PROTECTED] writes: To marshall a [[Int]] ... withArray2D xs f = withArray (concat xs) f withArray2D xs f = withArray xs' f where xs' = concat $ map (take dim) xs dim = minimum $ map length xs Um, I really wouldn't use the term