use internal polymorphic compare

*Sigh* I was really tired.

`compare` does well with lexicographic comparisons on structures.