Simplify the Cluster.tryAlloc structures
authorIustin Pop <iustin@google.com>
Wed, 8 Jul 2009 17:11:45 +0000 (19:11 +0200)
committerIustin Pop <iustin@google.com>
Wed, 8 Jul 2009 17:30:47 +0000 (19:30 +0200)
Currently the tryAlloc function calls the
allocateOnSingle/allocateOnPair and the builds a new tuple with those
functions's result plus the new node list. This is however suboptimal
in two respects:
  - the new nodes added are the 'old' versions of the respective nodes,
    so even though we don't use more than their names, it's logically
    broken
  - we do an extra unpack/repack of the result, while we could simply
    pass it through if allocateOnX returned the correct result

This patch makes the allocateOnX functions return the node list too and
also removes them and applyMove from the export list, as these are only
used within Cluster.hs.


No differences found