Could anyone please explain to me what is going on here?
You must, when declaring an instance of Ord, provide *either* a definition of (compare) or a definition of (<=). Both have default implementations defined, but in terms of each other; so if you don't provide either one in your instance declaration, you get an infinite loop when you try to use Ord methods (because (compare) invokes (<=), which invokes (compare) ...).