Can't install Criterion package on ghc ..

2010-04-13 Thread Mozhgan kabiri
Hi, I am trying to install Criterion package, but I keep getting an error and I can't figure it out why it is like this !! mozh...@mozhgan-kch:~$ cabal install Criterion Resolving dependencies... Configuring vector-algorithms-0.3... Preprocessing library vector-algorithms-0.3... Building

Re: Advice on Multiple GHC installations

2010-04-13 Thread Nils Anders Danielsson
On 2010-04-12 22:28, Bradford Larsen wrote: 2. If I cannot install multiple ghc versions from a different apt repository, does anyone have advice for how to work with multiple simultaneous installations? A how-to guide or anything like that? I install GHC under /usr/local/stow/ghc-version/

Re: Advice on Multiple GHC installations

2010-04-13 Thread Dave Bayer
On Apr 13, 2010, at 9:19 AM, Nils Anders Danielsson wrote: On 2010-04-12 22:28, Bradford Larsen wrote: 2. If I cannot install multiple ghc versions from a different apt repository, does anyone have advice for how to work with multiple simultaneous installations? A how-to guide or anything

Re: Advice on Multiple GHC installations

2010-04-13 Thread Sean Leather
Why not just use symbolic links? I too have multiple installations of ghc (at the moment, only two), and I choose between them using a symbolic link: book % ls -l /usr/local | grep ghc lrwxr-xr-x 1 root wheel10 Jan 12 00:05 ghc - ghc-6.12.1 drwxr-xr-x 7 dave wheel 238 Dec 25

Re: Can't install Criterion package on ghc ..

2010-04-13 Thread John Lato
From: Mozhgan kabiri mozhgan.kab...@gmail.com Hi, I am trying to install Criterion package, but I keep getting an error and I can't figure it out why it is like this !! mozh...@mozhgan-kch:~$ cabal install Criterion Resolving dependencies... Configuring vector-algorithms-0.3...

Re: Advice on Multiple GHC installations

2010-04-13 Thread Nils Anders Danielsson
On 2010-04-13 15:08, Dave Bayer wrote: Why not just use symbolic links? When using stow I am just using symbolic links (and directories), except that I don't need to create them all manually, and I can remove all of them with a single command. I don't need to modify my PATH. I only believe

Using -fext-core without a Main function

2010-04-13 Thread Hal Daume III
If I have a file 'Foo.hs' that contains one line 'addOne x = x + 1', I want to run something like: ghc -c -fext-core Foo.hs to get the core version of this file. Unfortunately, when I do that, it complains that Main doesn't have a function main. And it doesn't produce the .hcr file. I

Re: Using -fext-core without a Main function

2010-04-13 Thread Max Bolingbroke
The flag -fext-core is a red herring. GHC assumes any module with no module declaration is actually called Main and hence insists on a main declaration. mbolingbr...@perihelion ~/tmp $ ghc -c Hal.hs Hal.hs:1:0: The function `main' is not defined in module `Main' Compile this instead: module

FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-13 Thread Denys Rtveliashvili
Good morning, Yesterday I did a few tests to measure the performance of FFI calls and found that the calls themselves are very quick (1-2 nanosecond). However, there is a kind of FFI calls when one have to allocate a temporary memory block (for a struct, or a temporary buffer). One of examples is