Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module introduces Rat
kind and all necessary functional.
Documentation
Data structure represents the rational number.
Rational number can be represented as a pair of
natural numbers n
and m
where m
is nor equal
to zero.
SeriesP ([] Rat) Source # | |
SeriesF ([] Rat) Source # | |
(KnownRatName unit, SeriesP ((:) Rat nextUnit units)) => SeriesP ((:) Rat unit ((:) Rat nextUnit units)) Source # | |
KnownRatName unit => SeriesP ((:) Rat unit ([] Rat)) Source # | |
(KnownRatName unit, SeriesF ((:) Rat nextUnit units)) => SeriesF ((:) Rat unit ((:) Rat nextUnit units)) Source # | |
KnownRatName unit => SeriesF ((:) Rat unit ([] Rat)) Source # | |
type DivK Nat Rat Source # | |
type DivK Rat Nat Source # | |
type DivK Rat Rat Source # | |
type MulK Nat Rat Source # | |
type MulK Rat Nat Source # | |
type MulK Rat Rat Source # | |
type family MulK (k1 :: Type) (k2 :: Type) :: Type Source #
The result kind of overloaded multiplication.
type RatioNat = Ratio Natural Source #
Rational numbers, with numerator and denominator of Natural
type.
class KnownRat (r :: Rat) where Source #
This class gives the integer associated with a type-level rational.
type KnownDivRat a b = (KnownRat a, KnownRat b) Source #
Constraint alias for DivRat
units.