PartialOrder: functor to compute partial ordering
Implement explicit ordering with %priorities declarations
Cleanup implementation of partial order