-- This module can be included LibExcelStaged when using GHC-7.8, but cannot when using 7.6.
module MagicHaskeller.LibExcelStagedStaged where
import Data.Ratio(numerator, denominator)

instance RealFrac Int where
  properFraction x = (fromIntegral x,0)
  truncate = fromIntegral
  round    = fromIntegral
  ceiling  = fromIntegral
  floor    = fromIntegral

instance Fractional Int where -- This is necessary because Fractional is a superclass of RealFrac
  (/) = div
  fromRational r = fromIntegral (numerator r) `div` fromIntegral (denominator r)