To be more specific...
GHC used to inline the code you're exercising, which allows it to specialize to the comparison function, which allows it to keep all the numbers unboxed. But the current version of GHC doesn't do this, and if I force it to inline, the compiler will just die with a 'simplifier ticks exhausted' message.
I've been thinking about ways to avoid this situation, and have some ideas (one of which would work for your use case). But I guess in the mean time I should turn off use of these functions.