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

Safe HaskellNone

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 .$.

sin :: (Floating f, Convertable NoDimension b) => Value f NoDimension b -> Value f NoDimension CountSource

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

cos :: (Floating f, Convertable NoDimension b) => Value f NoDimension b -> Value f NoDimension CountSource

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

tan :: (Floating f, Convertable NoDimension b) => Value f NoDimension b -> Value f NoDimension CountSource

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

asin :: Floating f => Value f NoDimension Count -> Value f NoDimension RadianSource

Calculate the arcsinus of a value. Always computes Radians.

acos :: Floating f => Value f NoDimension Count -> Value f NoDimension RadianSource

Calculate the arccosinus of a value. Always computes Radians.

atan :: Floating f => Value f NoDimension Count -> Value f NoDimension RadianSource

Calculate the arctangens of a value. Always computes Radians.

(<) :: (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 .>.