unittyped-0.1: An extendable library for type-safe computations including units.

UnitTyped.NoPrelude

Description

A module renaming operators on values to names that would normally collide with the Prelude. E.g. `+`, `*`, `sin`.

Also adds instances for `Num` that makes it possible to write:

````>>> ````1 meter / second
``````

Synopsis

Documentation

(*) :: (Fractional f, Convertable a b, Convertable c d, UnitMerge a c u) => Value f a b -> Value f c d -> Value f u (Mul b d)Source

See `.*.`

(/) :: (Fractional f, Convertable a b, Convertable c d, UnitMerge a c' u, UnitNeg c c') => Value f a b -> Value f c d -> Value f u (Div b d)Source

See `./.`

(+) :: (Fractional f, Convertable a b, Convertable c d, UnitEq c a True) => Value f a b -> Value f c d -> Value f a bSource

See `.+.`

(-) :: (Fractional f, Convertable a b, Convertable c d, UnitEq c a True) => Value f a b -> Value f c d -> Value f a bSource

See `.-.`

(.) :: (Convertable a b, Fractional f) => f -> Value f a b -> Value f a bSource

See `.\$.`

Calculate the sinus of a value. Works on `Degree` and `Radian`.

Calculate the cosinus of a value. Works on `Degree` and `Radian`.

Calculate the tangens of a value. Works on `Degree` and `Radian`.

Calculate the arcsinus of a value. Always computes `Radian`s.

Calculate the arccosinus of a value. Always computes `Radian`s.

Calculate the arctangens of a value. Always computes `Radian`s.

(==) :: (Convertable a b, Convertable c d, UnitEq c a True) => Value Rational a b -> Value Rational c d -> BoolSource

See `.==.`

(<=) :: (Convertable a b, Convertable c d, UnitEq c a True) => Value Rational a b -> Value Rational c d -> BoolSource

See `.<=.`

(<) :: (Convertable a b, Convertable c d, UnitEq c a True) => Value Rational a b -> Value Rational c d -> BoolSource

See `.<.`

(>=) :: (Convertable a b, Convertable c d, UnitEq c a True) => Value Rational a b -> Value Rational c d -> BoolSource

See `.>.`

(>) :: (Convertable a b, Convertable c d, UnitEq c a True) => Value Rational a b -> Value Rational c d -> BoolSource

See `.>.`