Using fromIntegral instead of ghc internals