shithub: MicroHs

ref: 977b959064ac1d5d3ceba5ad7a32e29bb46bfc0c
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 = (:%)