To define an Ord instance you only need to implement compare because the other functions are derivable in terms of it.If you wany to explicitly implement max, a correct implementation could be: