Formatting of this code (formatted as such for didactic purposes)
instance Num b => Num (a -> b) where
(f + g) x = f x + g x
(f * g) x = f x * g x
...
is accepted by ghc (tested 9.6.7) but seems to get broken by hindent (tested with 6.2.1 and 6.3.0):
instance Num b => Num (a -> b) where
f + g x = f x + g x
f * g x = f x * g x
...
I didn't have a chance to look at the code yet to find a fix, will try later.