Simon Peyton-Jones [email protected]
Mon, 15 Oct 2001 04:44:31 -0700

| Is there a compiler (which version?) that optimizes qsort1 to=20
| (essentially) qsort2 ?
| Any hints concerning the possibility/impossibility of this=20
| would be helpful. Thanks and regards, Janis.

Alas, (still) not yet.  As you say, the transformation depends
on spotting a one-shot lambda, and our plan was to use
Keith Wansbrough's usage-type work to do that.  But Keith
has another job, and is busy writing up his thesis.  I'm still
hoping to get his stuff into GHC though, but it's not imminent.

A possible stop-gap would be a simpler analysis to catch
common cases like the one you give.  Any volunteers? =20