Safe Haskell | None |
---|---|
Language | Haskell2010 |
Time.Rational
Description
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.
Instances
SeriesP ([] Rat) # | |
SeriesF ([] Rat) # | |
(KnownRatName unit, SeriesP ((:) Rat nextUnit units)) => SeriesP ((:) Rat unit ((:) Rat nextUnit units)) # | |
KnownRatName unit => SeriesP ((:) Rat unit ([] Rat)) # | |
(KnownRatName unit, SeriesF ((:) Rat nextUnit units)) => SeriesF ((:) Rat unit ((:) Rat nextUnit units)) # | |
KnownRatName unit => SeriesF ((:) Rat unit ([] Rat)) # | |
type DivK Nat Rat # | |
type DivK Rat Nat # | |
type DivK Rat Rat # | |
type MulK Nat Rat # | |
type MulK Rat Nat # | |
type MulK Rat Rat # | |
class KnownRat (r :: Rat) where #
This class gives the integer associated with a type-level rational.
Minimal complete definition
type KnownDivRat a b = (KnownRat a, KnownRat b) #
Constraint alias for DivRat
units.