[Haskell-cafe] In-place modification

Andrew Coppin andrewcoppin at btinternet.com
Sun Jul 8 14:52:19 EDT 2007

Bulat Ziganshin wrote:
> Hello Andrew,
> Sunday, July 8, 2007, 9:40:15 PM, you wrote:
>> I've asked this before and nobody answered, so I take it that nobody
>> knows the answer... Does GHC *ever* do an in-place update on anything?
> no. this will break GC's heart :)

Yeah, having only immutable objects to collect must simplify a whole 
bunch of stuff...

> and it really breaks it as far as
> you start to work with updateable arrays. look for details at
> http://haskell.org/haskellwiki/Modern_array_libraries

"GHC 6.6 (currently in beta testing) will add..."

Oh, that's cute. ;-)

>> Does the STG even have a command for that?
> hm. there are ghc primitives that work with mutable arrays. look for
> primops.txt.pp in ghc sources.

The GHC sources. Scary place. ;-)

I did think about compiling GHC myself once. But then I found out that 
it's not actually written in Haskell - it's written in Haskell + C + asm 
+ Perl (?!) and it's utterly *huge*...

> btw, you doesn't need to use unix in
> order to play with ghc HEAD - you can download compiled windows binary

Seriously? I'm pretty sure I tried to do that and couldn't...

More information about the Haskell-Cafe mailing list