Safe Haskell | None |
---|---|
Language | Haskell98 |
- newtype T m t a = Cons (Const a (m t))
- cons :: a -> T m t a
- decons :: T m t a -> a
- relative :: (Ord a, Monoid a) => String -> a -> T m Relative a
- data Absolute = Absolute
- data Relative = Relative
- newtype Seconds = Seconds {}
- newtype Ticks = Ticks {}
- class RelativeC t
- class (Ord a, Monoid a) => Split a where
- class MonadMoment m => Timed m where
- class Quantity a where
- consRel :: String -> Rational -> T m Relative Seconds
- inc :: Monoid a => T m Relative a -> T m t a -> T m t a
- subSat :: Split a => T m t a -> T m t a -> T m Relative a
- scale :: Double -> T m Relative Ticks -> T m Relative Ticks
- scaleCeiling :: Double -> T m Relative Ticks -> T m Relative Ticks
- scaleInt :: Integral i => i -> T m Relative Ticks -> T m Relative Ticks
- div :: T m Relative Ticks -> T m Relative Ticks -> Double
- getTicks :: Num a => T m Relative Ticks -> a
Documentation
The T
types are used instead of floating point types,
because the latter ones caused unpredictable 'negative number' errors.
There should be a common denominator to all involved numbers.
This way we can prevent unlimited growth of denominators.
class (Ord a, Monoid a) => Split a where Source #
Technically identical to NonNeg.C but without connotation of non-negativity.
class MonadMoment m => Timed m where Source #