Andrew J Bromage
Thu, 27 Jun 2002 09:26:39 +1000

G'day all.

On Wed, Jun 26, 2002 at 04:06:50PM +0200, Koen Claessen wrote:

> What implementation of mergesort are you using? (Could you
> send me code?)

I don't know for sure, but I'd be willing to bet it's Carsten Holst's
merge sort with Andy Gill's partition function.  If you have the GHC
sources handy, you'll find it in ghc/compiler/utils/Util.lhs and the
function is called mergeSort (note the capitalisation).  There are a
number of variations for various alternate orderings in there too.

If you don't have the GHC source and don't want to download it for
some reason, I've temporarily put a copy of the relevant file at:

This will be removed in a few days.

Andrew Bromage