I was answering a question and wrote some code to get the job done.
isPrime :: Int -> Bool
isPrime n = primeCheck n $ floor $ sqrt $ (fromIntegral n :: Double)
I assumed that the explicit type signature would be required, as explained in my answer. Then I checked it in both GHC and GHCi and discovered that I did not need the explicit type for the conversion despite floor and sqrt being polymorphic. I know GHCi does does some type defaulting, but I'm not aware of any in GHC. Obviously both Float and Double would be valid choices here, why does GHC choose one over the other? What type is defaulted to, and why does (presumably) GHC default in this case?