shithub: MicroHs

ref: 6eb68e5c797ab99ae917aabcd1a2c4c54bc9cf1a
dir: /lib/Data/Ratio_Type.hs/

View raw version
module Data.Ratio_Type(module Data.Ratio_Type) where
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 = (:%)