<p>If you are willing to depend on a recent version of base where Num is no longer a subclass of Eq and Show, it is also fine to do this:</p>
<p>instance Num a =&gt; Num (r -&gt; a) where<br>
    (f + g) x = f x + g x<br>
    fromInteger = const . fromInteger</p>
<p>and so on.</p>