[Haskell-cafe] Re: idea for avoiding temporaries

John Meacham john at repetae.net
Mon Mar 12 20:21:46 EDT 2007

On Fri, Mar 09, 2007 at 10:24:14AM +0000, Simon Marlow wrote:
> GHC doesn't have any kind of uniqueness analysis right now.  It's pretty 
> hard to do in general: imagine a function that takes an array as an 
> argument and delivers an array as a result.  It'll probably need two 
> versions: one when the argument is unique, one for when it's not.  If you 
> can see all the call sites you might be able to throw away one of these 
> versions, but with separate compilation that's the uncommon case.

Ah, yes. I keep on thinking this is used since I studied it carefully as
a potential algorithm for jhc... (still undecided, my implementation is
too buggy to use in production and jhc has enough bugs as is :) )

> BTW, we don't do any update-avoidance at the moment.  The old update 
> analyser was slow and didn't give any significant benefit, so we dropped it.

I find a general problem when researching ghc is that a lot of past
research projects used it as a base and declare things like 'we
integrated this into the ghc 4.04 haskell compiler' but it is not clear
whether the code actually made it back into the mainline or not..

Perhaps A section of the wiki is in order that lists the most recent
paper that describes various parts of what is actually used in the
production ghc.

perhaps something like

type checker : boxy types and impredicativity paper + Wobbly type GADT
inference paper
optimizer/simplifier : secrets of haskell inliner paper
runtime: eval/apply vs push-enter paper
garbage collector: non-stop collection for haskell paper
fundep implementation: ?
concurrency: STM papers + original concurrency paper

(are these accurate BTW?)


John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-Cafe mailing list