Exponents defaulting to Integer
问题 I use (^) :: (Num a, Integral b) => a -> b -> a a lot to define constant factors or sizes. Problem is that GHC complains about defaulting to Integer . Now I know why this happens ... and I know that I can "just" write (x^(y::Int)) to get rid of the warning. But that looks just "ugly". Otoh living with the warnings is also not a great option. Same thing applies for (^^) :: (Integral b, Fractional a) => a -> b -> a and (**) :: Floating a => a -> a -> a is not usable to me. Anyone has a nice