shithub: MicroHs

ref: dd5a0c75229d88171c33f9b85df9c80f5414c09a
dir: /lib/Data/Ratio_Type.hs/

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

data Ratio a = !a :% !a

type Rational = Ratio Integer

_integerToRational :: Integer -> Rational
_integerToRational x = x :% (1::Integer)

_mkRational :: Integer -> Integer -> Rational
_mkRational = (:%)