Add sized numeric rewrite rules to fromIntegral
Looking at fromIntegral
in GHC.Real, it looks like there are no rewrite rules for sized numerics like Word8
etc., which is critical since users are likely to reach for these types when they're most interested in bit-twiddling high-performance code.
Also, I'm not sure how the NOINLINE
annotation works here with the rewrite rules, but just to be clear, for these cases where the rules fire, we do want the subsequent body inlined, as without that, you incur function call overhead for a trivial operation.