« Previous | Next » 

Revision 685935f7

ID685935f795f8782af9c7556d464fb122f51c9773

Added by Iustin Pop almost 15 years ago

Simplify the Cluster.tryAlloc structures

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.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences