niceShow x = if isInt x then show (floor x :: Int) else show x
I get a warning about a “too strict if”. If I then follow the recommendation and change niceShow to be
show (if isInt x then (floor x :: Int) else x)
Then I get an error that Couldn't match expected type `Int' with actual type `Double' which makes sense because floor x :: Int produces an Int but x alone is a Double. Surely hlint could have figured this out from the type signatures and not made the recommendation to change my if structure?