shithub: MicroHs

ref: fb56ed92bedfcc5e6be2fc9f917c570fca17178d
dir: /lib/Data/Real.hs/

View raw version
module Data.Real(module Data.Real) where
import Prelude()              -- do not import Prelude
import Primitives
import Data.Fractional
import Data.Num
import Data.Ratio_Type

class Num a => Real a where
  toRational :: a -> Rational

realToFrac :: forall a b . (Real a, Fractional b) => a -> b
realToFrac a = fromRational (toRational a)