Add scalExpType function and make fromScalExp also handle non-int arithmetic.