Skip to content
Snippets Groups Projects
Commit 685935f7 authored by Iustin Pop's avatar Iustin Pop
Browse files

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.
parent 8880d889
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment