[Haskell-cafe] Compiling ghc for using STM

Asfand Yar Qazi ayqazi at gmail.com
Mon Jul 17 13:29:05 EDT 2006


On 7/17/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> Hello Asfand,
>
> Monday, July 17, 2006, 7:31:23 PM, you wrote:
>
> > I finally got my spiffy dual-core processor (an Opteron 165 no-less)
> > and want to learn STM, since I think it and haskell are the future of
> > concurrent programming.
>
> > How do I compile Haskell to be able learn STM on it, using "proper"
> > threading?  I know there's a parallel haskell flag, but I read
> > somewhere about it running on top of some special server that lets it
> > work in parallel threads or something.
>
> you should compile with "-threaded" flag which allows to preempt
> threads created in your program with forkIO/forkOS
>
> if you want to really use 2 processors, you should use ghc 6.5, which
> is still in beta stage. ghc 6.4 executes all the Haskell code on one
> processor (to be exact, at each moment there is only one program
> thread executing Haskell code)

I should have explained: I've already got ghc trunk successfully
compiled.  I just need to turn on native threading or whatever its
called so I can learn STM'ism (and no, I can't make do with in-process
threads - I didn't pay 230 GBP for a dual-core processor to have one
in the background processing cron jobs :-)

So, as soon as I figure out how to compile ghc 6.5 beta, and how to
include parallelisation support, I'm set :-)


More information about the Haskell-Cafe mailing list